Class: Decidim::Initiatives::ApplicationController

Inherits:
ApplicationController show all
Includes:
NeedsPermission
Defined in:
decidim-initiatives/app/controllers/decidim/initiatives/application_controller.rb

Overview

The main application controller for initiatives

This controller is the abstract class from which all other controllers of this engine inherit.

Instance Method Summary collapse

Methods included from RegistersPermissions

register_permissions

Methods inherited from ApplicationController

#store_share_token

Methods included from UserBlockedChecker

#check_user_block_status, #check_user_not_blocked

Methods included from NeedsSnippets

#snippets

Methods included from Headers::HttpCachingDisabler

#disable_http_caching

Methods included from HasStoredPath

#skip_store_location?, #store_current_location

Methods included from TranslatableAttributes

#default_locale?

Methods included from NeedsOrganization

enhance_controller, extended, included

Instance Method Details

#permission_class_chainObject



29
30
31
# File 'decidim-initiatives/app/controllers/decidim/initiatives/application_controller.rb', line 29

def permission_class_chain
  ::Decidim.permissions_registry.chain_for(::Decidim::Initiatives::ApplicationController)
end

#permission_scopeObject



33
34
35
# File 'decidim-initiatives/app/controllers/decidim/initiatives/application_controller.rb', line 33

def permission_scope
  :public
end

#permissions_contextObject



23
24
25
26
27
# File 'decidim-initiatives/app/controllers/decidim/initiatives/application_controller.rb', line 23

def permissions_context
  super.merge(
    current_participatory_space: try(:current_participatory_space)
  )
end