Class: Decidim::Features::BaseController
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.
Instance Method Summary
collapse
#_action_authorizer, #action_authorization, #authorize_action!, #authorize_action_path
enhance_controller, extended, included
Instance Method Details
#ability_context ⇒ Object
47
48
49
50
51
52
53
|
# File 'app/controllers/decidim/features/base_controller.rb', line 47
def ability_context
super.merge(
current_manifest: current_manifest,
current_settings: current_settings,
feature_settings: feature_settings
)
end
|
#current_feature ⇒ Object
35
36
37
|
# File 'app/controllers/decidim/features/base_controller.rb', line 35
def current_feature
request.env["decidim.current_feature"]
end
|
#current_manifest ⇒ Object
39
40
41
|
# File 'app/controllers/decidim/features/base_controller.rb', line 39
def current_manifest
@current_manifest ||= current_feature.manifest
end
|
#current_participatory_space ⇒ Object
43
44
45
|
# File 'app/controllers/decidim/features/base_controller.rb', line 43
def current_participatory_space
current_feature.participatory_space
end
|