investment can not have many headings
This commit is contained in:
committed by
Juanjo Bazán
parent
183034abb4
commit
da769d8746
@@ -20,5 +20,4 @@ class Budget < ActiveRecord::Base
|
||||
phase == "finished"
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
@@ -3,6 +3,8 @@ class Budget
|
||||
belongs_to :budget
|
||||
belongs_to :geozone
|
||||
|
||||
has_many :investments
|
||||
|
||||
validates :budget_id, presence: true
|
||||
validates :name, presence: true
|
||||
validates :price, presence: true
|
||||
|
||||
@@ -17,7 +17,6 @@ class Budget
|
||||
has_many :valuation_assignments, dependent: :destroy
|
||||
has_many :valuators, through: :valuation_assignments
|
||||
has_many :comments, as: :commentable
|
||||
has_many :headings, dependent: :destroy
|
||||
|
||||
validates :title, presence: true
|
||||
validates :author, presence: true
|
||||
|
||||
Reference in New Issue
Block a user