Class: Decidim::ParticipatoryProcesses::Admin::ParticipatoryProcessGroupLandingPageController
- Inherits:
-
ApplicationController
- Object
- Admin::ApplicationController
- ApplicationController
- Decidim::ParticipatoryProcesses::Admin::ParticipatoryProcessGroupLandingPageController
- Includes:
- Admin::ContentBlocks::LandingPage, TranslatableAttributes
- Defined in:
- app/controllers/decidim/participatory_processes/admin/participatory_process_group_landing_page_controller.rb
Overview
Controller that allows managing the participatory process group landing page
Instance Method Summary collapse
- #content_block_scope ⇒ Object
- #enforce_permission_to_update_resource ⇒ Object
- #resource_content_block_cell ⇒ Object
- #resource_create_url(manifest_name) ⇒ Object
- #resource_sort_url ⇒ Object
- #scoped_resource ⇒ Object (also: #participatory_process_group)
Instance Method Details
#content_block_scope ⇒ Object
19 20 21 |
# File 'app/controllers/decidim/participatory_processes/admin/participatory_process_group_landing_page_controller.rb', line 19 def content_block_scope :participatory_process_group_homepage end |
#enforce_permission_to_update_resource ⇒ Object
27 28 29 |
# File 'app/controllers/decidim/participatory_processes/admin/participatory_process_group_landing_page_controller.rb', line 27 def :update, :process_group, process_group: scoped_resource end |
#resource_content_block_cell ⇒ Object
40 41 42 |
# File 'app/controllers/decidim/participatory_processes/admin/participatory_process_group_landing_page_controller.rb', line 40 def resource_content_block_cell "decidim/participatory_process_groups/content_block" end |
#resource_create_url(manifest_name) ⇒ Object
35 36 37 38 |
# File 'app/controllers/decidim/participatory_processes/admin/participatory_process_group_landing_page_controller.rb', line 35 def resource_create_url(manifest_name) participatory_process_group_landing_page_content_blocks_path(participatory_process_group_id: params[:participatory_process_group_id], manifest_name:) end |
#resource_sort_url ⇒ Object
31 32 33 |
# File 'app/controllers/decidim/participatory_processes/admin/participatory_process_group_landing_page_controller.rb', line 31 def resource_sort_url participatory_process_group_landing_page_path(scoped_resource) end |
#scoped_resource ⇒ Object Also known as: participatory_process_group
23 24 25 |
# File 'app/controllers/decidim/participatory_processes/admin/participatory_process_group_landing_page_controller.rb', line 23 def scoped_resource @scoped_resource ||= collection.find(params[:participatory_process_group_id]) end |