Class: Decidim::Lausanne::Budgets::LineItem
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Decidim::Lausanne::Budgets::LineItem
- Defined in:
- app/models/decidim/lausanne/budgets/line_item.rb
Overview
The data store for a LineItem in the Budget resource. It describes an association between an order and a project.
Instance Method Summary collapse
Instance Method Details
#same_budget ⇒ Object
15 16 17 18 19 |
# File 'app/models/decidim/lausanne/budgets/line_item.rb', line 15 def same_budget return unless order && project errors.add(:order, :invalid) unless order.budget == project.budget end |