Class: Decidim::Budgets::Admin::BudgetForm
- Inherits:
-
Form
- Object
- Form
- Decidim::Budgets::Admin::BudgetForm
- Includes:
- TranslatableAttributes
- Defined in:
- app/forms/decidim/budgets/admin/budget_form.rb
Overview
This class holds a Form to create/update budgets from Decidim’s admin panel.
Instance Method Summary collapse
-
#decidim_scope_id ⇒ Object
Scope identifier.
-
#scope ⇒ Object
Finds the Scope from the given decidim_scope_id, uses the compoenent scope if missing.
Instance Method Details
#decidim_scope_id ⇒ Object
Scope identifier
Returns the scope identifier related to the meeting
33 34 35 |
# File 'app/forms/decidim/budgets/admin/budget_form.rb', line 33 def decidim_scope_id @decidim_scope_id || scope&.id end |
#scope ⇒ Object
Finds the Scope from the given decidim_scope_id, uses the compoenent scope if missing.
Returns a Decidim::Scope
26 27 28 |
# File 'app/forms/decidim/budgets/admin/budget_form.rb', line 26 def scope @scope ||= @decidim_scope_id ? current_component.scopes.find_by(id: @decidim_scope_id) : current_component.scope end |