app/controllers/refinery/pages/admin/preview_controller.rb in refinerycms-pages-3.0.3 vs app/controllers/refinery/pages/admin/preview_controller.rb in refinerycms-pages-3.0.4

- old
+ new

@@ -8,12 +8,10 @@ include Refinery::Admin::BaseController include Pages::RenderOptions skip_before_action :error_404, :set_canonical - layout :layout - def show render_with_templates? end protected @@ -31,19 +29,21 @@ @page = Page.new page_params end end alias_method :page, :find_page - def layout - 'application' + def page_params + params.require(:page).permit(permitted_page_params) end - def page_params - params.require(:page).permit( + private + + def permitted_page_params + [ :browser_title, :draft, :link_url, :menu_title, :meta_description, :parent_id, :skip_to_first_child, :show_in_menu, :title, :view_template, - :layout_template, parts_attributes: [:id, :title, :body, :position] - ) + :layout_template, :custom_slug, parts_attributes: [:id, :title, :slug, :body, :position] + ] end end end end end