Module: PagesCore::PageParameters
- Extended by:
- ActiveSupport::Concern
- Included in:
- Admin::PagesController, PagesCore::Pages::PreviewController
- Defined in:
- app/controllers/concerns/pages_core/page_parameters.rb
Instance Method Summary collapse
- #page_attachment_attributes ⇒ Object
- #page_content_attributes ⇒ Object
- #page_static_attributes ⇒ Object
Instance Method Details
#page_attachment_attributes ⇒ Object
7 8 9 10 |
# File 'app/controllers/concerns/pages_core/page_parameters.rb', line 7 def { page_images_attributes: %i[id position image_id primary _destroy], page_files_attributes: %i[id position attachment_id _destroy] } end |
#page_content_attributes ⇒ Object
12 13 14 15 16 17 18 19 20 21 |
# File 'app/controllers/concerns/pages_core/page_parameters.rb', line 12 def page_content_attributes locales = PagesCore.config.locales&.keys || [I18n.default_locale] [page_static_attributes, PagesCore::Templates::TemplateConfiguration.all_blocks, :path_segment, (PagesCore::Templates::TemplateConfiguration .localized_blocks + %i[path_segment]) .index_with { locales }, ] end |
#page_static_attributes ⇒ Object
23 24 25 26 27 |
# File 'app/controllers/concerns/pages_core/page_parameters.rb', line 23 def page_static_attributes %i[template user_id status feed_enabled published_at redirect_to news_page unique_name pinned parent_page_id serialized_tags meta_image_id starts_at ends_at all_day skip_index] end |