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

@@ -6,6 +6,9 @@ class SpendingProposal < ActiveRecord::Base
belongs_to :author, -> { with_hidden }, class_name: 'User', foreign_key: 'author_id'
belongs_to :geozone
belongs_to :administrator
has_many :valuation_assignments, dependent: :destroy
has_many :valuators, through: :valuation_assignments
validates :title, presence: true
validates :author, presence: true