Move public_author into module

This commit is contained in:
Alberto Miedes Garcés
2017-01-01 20:46:08 +01:00
parent 7dc4d80e7b
commit 9c6001e987
4 changed files with 8 additions and 3 deletions

View File

@@ -6,6 +6,7 @@ class Proposal < ActiveRecord::Base
include Sanitizable
include Searchable
include Filterable
include HasPublicAuthor
acts_as_votable
acts_as_paranoid column: :hidden_at
@@ -14,7 +15,6 @@ class Proposal < ActiveRecord::Base
RETIRE_OPTIONS = %w(duplicated started unfeasible done other)
belongs_to :author, -> { with_hidden }, class_name: 'User', foreign_key: 'author_id'
belongs_to :public_author, -> { with_public_activity }, class_name: 'User', foreign_key: 'author_id'
belongs_to :geozone
has_many :comments, as: :commentable
has_many :proposal_notifications