creates new fields and assignments for spending_ps

This commit is contained in:
Juanjo Bazán
2016-02-24 18:52:15 +01:00
parent 00eec532a6
commit 34239d8478
8 changed files with 59 additions and 11 deletions

View File

@@ -2,5 +2,8 @@ class Valuator < ActiveRecord::Base
belongs_to :user, touch: true
delegate :name, :email, to: :user
has_many :valuation_assignments, dependent: :destroy
has_many :spending_proposals, through: :valuation_assignments
validates :user_id, presence: true, uniqueness: true
end