investment can not have many headings

This commit is contained in:
Juanjo Bazán
2016-05-23 13:53:09 +02:00
committed by Juanjo Bazán
parent 183034abb4
commit da769d8746
3 changed files with 3 additions and 3 deletions

View File

@@ -20,5 +20,4 @@ class Budget < ActiveRecord::Base
phase == "finished"
end
end
end

View File

@@ -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

View File

@@ -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