Class: Decidim::Budgets::ApplicationController
- Inherits:
-
Components::BaseController
- Object
- Components::BaseController
- Decidim::Budgets::ApplicationController
show all
- Defined in:
- decidim-budgets/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.
Instance Method Summary
collapse
Instance Method Details
#current_workflow ⇒ Object
13
14
15
|
# File 'decidim-budgets/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
|
#show_votes_count? ⇒ Boolean
25
26
27
|
# File 'decidim-budgets/app/controllers/decidim/budgets/application_controller.rb', line 25
def show_votes_count?
current_settings.show_votes?
end
|
#voting_finished? ⇒ Boolean
21
22
23
|
# File 'decidim-budgets/app/controllers/decidim/budgets/application_controller.rb', line 21
def voting_finished?
current_settings.votes == "finished"
end
|
#voting_open? ⇒ Boolean
17
18
19
|
# File 'decidim-budgets/app/controllers/decidim/budgets/application_controller.rb', line 17
def voting_open?
current_settings.votes == "enabled"
end
|