Class: Decidim::Admin::OrganizationHomepageController

Inherits:
ApplicationController show all
Includes:
ContentBlocks::LandingPage
Defined in:
app/controllers/decidim/admin/organization_homepage_controller.rb

Overview

Controller that allows managing the organization homepage

Instance Method Summary collapse

Methods inherited from ApplicationController

#permission_class_chain, #permission_scope, #user_has_no_permission_path, #user_not_authorized_path

Instance Method Details

#content_block_scopeObject



13
14
15
# File 'app/controllers/decidim/admin/organization_homepage_controller.rb', line 13

def content_block_scope
  :homepage
end

#enforce_permission_to_update_resourceObject



21
22
23
# File 'app/controllers/decidim/admin/organization_homepage_controller.rb', line 21

def enforce_permission_to_update_resource
  enforce_permission_to :update, :organization, organization: current_organization
end

#resource_content_block_cellObject



33
34
35
# File 'app/controllers/decidim/admin/organization_homepage_controller.rb', line 33

def resource_content_block_cell
  "decidim/admin/homepage_content_block"
end

#resource_create_url(manifest_name) ⇒ Object



29
30
31
# File 'app/controllers/decidim/admin/organization_homepage_controller.rb', line 29

def resource_create_url(manifest_name)
  organization_homepage_content_blocks_path(manifest_name:)
end

#resource_sort_urlObject



25
26
27
# File 'app/controllers/decidim/admin/organization_homepage_controller.rb', line 25

def resource_sort_url
  organization_homepage_path
end

#scoped_resourceObject



17
18
19
# File 'app/controllers/decidim/admin/organization_homepage_controller.rb', line 17

def scoped_resource
  nil
end