Class: Decidim::Budgets::BudgetsType

Inherits:
Core::ComponentType
  • Object
show all
Defined in:
lib/decidim/api/budgets_type.rb

Instance Method Summary collapse

Instance Method Details

#budget(id:) ⇒ Object



18
19
20
# File 'lib/decidim/api/budgets_type.rb', line 18

def budget(id:)
  Decidim::Core::ComponentFinderBase.new(model_class: Budget).call(object, { id: }, context)
end

#budgetsObject



14
15
16
# File 'lib/decidim/api/budgets_type.rb', line 14

def budgets
  Budget.where(component: object).includes(:component)
end