Class: Decidim::Initiatives::ApplicationController

Inherits:
ApplicationController
  • Object
show all
Includes:
NeedsPermission
Defined in:
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

Instance Method Details

#permission_class_chainObject



29
30
31
# File '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 'app/controllers/decidim/initiatives/application_controller.rb', line 33

def permission_scope
  :public
end

#permissions_contextObject



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

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