adds has_many proposals to user

This commit is contained in:
Juanjo Bazán
2015-09-23 17:09:41 +02:00
parent 599ddbb575
commit 7b9c050df2

View File

@@ -20,6 +20,7 @@ class User < ActiveRecord::Base
has_many :flags
has_many :identities, dependent: :destroy
has_many :debates, -> { with_hidden }, foreign_key: :author_id
has_many :proposals, -> { with_hidden }, foreign_key: :author_id
has_many :comments, -> { with_hidden }
validates :username, presence: true, unless: :organization?