Class: Decidim::Admin::Components::BaseController
Overview
This controller is the abstract class from which all component controllers in their admin engines should inherit from.
Instance Method Summary
collapse
#current_ability_klass, #user_not_authorized_path
Instance Method Details
#current_component ⇒ Object
31
32
33
|
# File 'app/controllers/decidim/admin/components/base_controller.rb', line 31
def current_component
request.env["decidim.current_component"]
end
|
#current_participatory_space ⇒ Object
35
36
37
|
# File 'app/controllers/decidim/admin/components/base_controller.rb', line 35
def current_participatory_space
current_component.participatory_space
end
|
#parent_path ⇒ Object
39
40
41
|
# File 'app/controllers/decidim/admin/components/base_controller.rb', line 39
def parent_path
@parent_path ||= EngineRouter.admin_proxy(current_participatory_space).components_path
end
|