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