Method: Thredded::PrivatePost#readers
- Defined in:
- app/models/thredded/private_post.rb
#readers ⇒ ActiveRecord::Relation<Thredded.user_class>
Returns users that can read this post.
42 43 44 45 46 47 48 49 |
# File 'app/models/thredded/private_post.rb', line 42 def readers collection_proxy = postable.users if persisted? collection_proxy.scope else Thredded.user_class.where(id: collection_proxy.to_a.map(&:id)) end end |