Module: UnreadMongoid::Readable::Scopes
- Defined in:
- lib/unread_mongoid/scopes.rb
Instance Method Summary collapse
- #read_by(user) ⇒ Object
-
#unread_by(user) ⇒ Object
TODO rename some of these.
Instance Method Details
#read_by(user) ⇒ Object
10 11 12 |
# File 'lib/unread_mongoid/scopes.rb', line 10 def read_by(user) self.in(_id: read_ids(user)) end |
#unread_by(user) ⇒ Object
TODO rename some of these
6 7 8 |
# File 'lib/unread_mongoid/scopes.rb', line 6 def unread_by(user) self.not_in(_id: read_ids(user)) end |