-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Feature/mobility #6
base: master
Are you sure you want to change the base?
Conversation
gloubier
commented
May 9, 2018
•
edited
Loading
edited
- Use Mobility instead of Globalize
- Update to work with Refinery 4.0
- Update to work with Rails 5
- Add ability to disable slide and sliders
config/routes.rb
Outdated
@@ -16,4 +16,4 @@ | |||
end | |||
end | |||
|
|||
end | |||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/TrailingBlankLines: Final newline missing.
@@ -1,4 +1,4 @@ | |||
Refinery::Core::Engine.routes.append do | |||
Refinery::Core::Engine.routes.draw do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true.
before_filter :find_image_slide, :except => [:index, :new] | ||
before_action :find_image_slideshow | ||
before_action :find_image_slides, only: :index | ||
before_action :find_image_slide, :except => [:index, :new] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/HashSyntax: Use the new Ruby 1.9 hash syntax.
Style/SymbolArray: Use %i or %I for an array of symbols.
Gemfile
Outdated
gem "refinerycms" | ||
|
||
group :test do | ||
gem "refinerycms-testing" | ||
end | ||
end | ||
|
||
# TODO: remove refinerycms-i18n and mobility from this Gemfile before merging this PR | ||
gem 'refinerycms-i18n', git: "https://github.com/refinery/refinerycms-i18n", branch: 'feature/mobility' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Metrics/LineLength: Line is too long. [103/80]
Gemfile
Outdated
gem "refinerycms" | ||
|
||
group :test do | ||
gem "refinerycms-testing" | ||
end | ||
end | ||
|
||
# TODO: remove refinerycms-i18n and mobility from this Gemfile before merging this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Metrics/LineLength: Line is too long. [85/80]
class CreateImageSlidesTranslations < ActiveRecord::Migration[5.1] | ||
def change | ||
create_table :refinery_image_slide_translations do |t| | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/EmptyLinesAroundBlockBody: Extra empty line detected at block body beginning.
:migrate_data => true | ||
}) | ||
end | ||
class CreateImageSlidesTranslations < ActiveRecord::Migration[5.1] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/Documentation: Missing top-level class documentation comment.
Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true.
@@ -1,4 +1,4 @@ | |||
class AddHeightAndWidthToImageSlideshows < ActiveRecord::Migration | |||
class AddHeightAndWidthToImageSlideshows < ActiveRecord::Migration[5.1] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/Documentation: Missing top-level class documentation comment.
Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true.
@@ -1,4 +1,4 @@ | |||
class AddLinkUrlToImageSlides < ActiveRecord::Migration | |||
class AddLinkUrlToImageSlides < ActiveRecord::Migration[5.1] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/Documentation: Missing top-level class documentation comment.
Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true.
@@ -1,4 +1,4 @@ | |||
class AddJsConfigToImageSlideshows < ActiveRecord::Migration | |||
class AddJsConfigToImageSlideshows < ActiveRecord::Migration[5.1] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/Documentation: Missing top-level class documentation comment.
Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true.
Remove deprecated "quiet_assets" gem
Bugfix dependency resolution
@@ -9,6 +9,7 @@ class ImageSlideshowsController < ::Refinery::AdminController | |||
|
|||
def image_slideshow_params | |||
params.require(:image_slideshow).permit( | |||
:active, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
by convention we use draft
logic instead of active
logic
@@ -23,6 +24,10 @@ | |||
<% end %> | |||
</span> | |||
|
|||
<%= content_tag :span, class: "#{image_slide.active? ? :success_icon : :failure_icon} less-important" do %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have label to handle draft
display: https://github.com/refinery/refinerycms/blob/88f3eee61914d548dce5e7c1d1f8d3a57a0c9ece/pages/app/helpers/refinery/admin/pages_helper.rb#L51-L53
QA Feature/mobility