adds Budget::Group model to group headings

many refactors through budget related models
This commit is contained in:
Juanjo Bazán
2016-06-09 18:00:06 +02:00
parent 3fae269c40
commit b5a6828e41
18 changed files with 156 additions and 110 deletions

View File

@@ -1,11 +1,11 @@
class Budget
class Heading < ActiveRecord::Base
belongs_to :budget
belongs_to :group
belongs_to :geozone
has_many :investments
validates :budget_id, presence: true
validates :group_id, presence: true
validates :name, presence: true
validates :price, presence: true
end