Class: Decidim::Budgets::ApplicationController
- Inherits:
-
Components::BaseController
- Object
- Components::BaseController
- Decidim::Budgets::ApplicationController
- Defined in:
- app/controllers/decidim/budgets/application_controller.rb
Overview
This controller is the abstract class from which all other controllers of this engine inherit.
Note that it inherits from ‘Decidim::Components::BaseController`, which override its layout and provide all kinds of useful methods.
Direct Known Subclasses
BudgetsController, LineItemsController, OrdersController, ProjectsController
Instance Method Summary collapse
Instance Method Details
#current_workflow ⇒ Object
13 14 15 |
# File 'app/controllers/decidim/budgets/application_controller.rb', line 13 def current_workflow @current_workflow ||= Decidim::Budgets.workflows[workflow_name].new(current_component, current_user) end |
#voting_finished? ⇒ Boolean
21 22 23 |
# File 'app/controllers/decidim/budgets/application_controller.rb', line 21 def voting_finished? current_settings.votes == "finished" end |
#voting_open? ⇒ Boolean
17 18 19 |
# File 'app/controllers/decidim/budgets/application_controller.rb', line 17 def voting_open? current_settings.votes == "enabled" end |