Class: Decidim::Features::BaseController
- Inherits:
-
ApplicationController
- Object
- DecidimController
- ApplicationController
- Decidim::Features::BaseController
- Includes:
- ActionAuthorization, Settings
- Defined in:
- decidim-core/app/controllers/decidim/features/base_controller.rb
Overview
Controller from which all feature engines inherit from. It’s in charge of setting the appropiate layout, including necessary helpers, and overall fooling the engine into thinking it’s isolated.
Direct Known Subclasses
Budgets::ApplicationController, Meetings::ApplicationController, Pages::ApplicationController, Proposals::ApplicationController, Results::ApplicationController, Surveys::ApplicationController
Instance Method Summary collapse
- #ability_context ⇒ Object
- #current_feature ⇒ Object
- #current_manifest ⇒ Object
- #current_participatory_space ⇒ Object
Methods included from ActionAuthorization
#_action_authorizer, #action_authorization, #authorize_action!, #authorize_action_path, #authorize_action_path_from_status
Methods included from NeedsOrganization
enhance_controller, extended, included
Instance Method Details
#ability_context ⇒ Object
46 47 48 49 50 51 52 |
# File 'decidim-core/app/controllers/decidim/features/base_controller.rb', line 46 def ability_context super.merge( current_manifest: current_manifest, current_settings: current_settings, feature_settings: feature_settings ) end |
#current_feature ⇒ Object
34 35 36 |
# File 'decidim-core/app/controllers/decidim/features/base_controller.rb', line 34 def current_feature request.env["decidim.current_feature"] end |
#current_manifest ⇒ Object
38 39 40 |
# File 'decidim-core/app/controllers/decidim/features/base_controller.rb', line 38 def current_manifest @current_manifest ||= current_feature.manifest end |
#current_participatory_space ⇒ Object
42 43 44 |
# File 'decidim-core/app/controllers/decidim/features/base_controller.rb', line 42 def current_participatory_space current_feature.participatory_space end |