-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #76 from bricesanchez/master
Update engine for refinerycms 3.0.0
- Loading branch information
Showing
7 changed files
with
26 additions
and
24 deletions.
There are no files selected for viewing
File renamed without changes.
16 changes: 6 additions & 10 deletions
16
app/decorators/controllers/refinery/admin/pages_controller_decorator.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,8 @@ | ||
Refinery::Admin::PagesController.class_eval do | ||
|
||
# Add :copywriting_phrases_attributes to page_params for strong parameters. | ||
def page_params_with_copywriting_phrases_params | ||
phrases_params = params.require(:page).permit( | ||
copywriting_phrases_attributes: [:id, :value] | ||
) | ||
page_params_without_copywriting_phrases_params.merge(phrases_params) | ||
module RefineryCopywritingControllerDecorator | ||
def permitted_page_params | ||
params[:page][:copywriting_phrases_attributes] ||= {} | ||
super << [copywriting_phrases_attributes: [:id, :value]] | ||
end | ||
alias_method_chain :page_params, :copywriting_phrases_params | ||
|
||
end | ||
|
||
Refinery::Admin::PagesController.send :prepend, RefineryCopywritingControllerDecorator |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters