Add association between polls and budgets

This commit is contained in:
rgarcia
2018-06-04 20:00:09 +02:00
committed by Javi Martín
parent d3660d1245
commit 20a3f6539d
4 changed files with 11 additions and 0 deletions

View File

@@ -23,6 +23,7 @@ class Poll < ActiveRecord::Base
has_and_belongs_to_many :geozones
belongs_to :author, -> { with_hidden }, class_name: "User", foreign_key: "author_id"
belongs_to :budget
validates_translation :name, presence: true
validate :date_range