Class: Jinda::Notice

Inherits:
Object
  • Object
show all
Includes:
Mongoid::Document, Mongoid::Timestamps
Defined in:
lib/generators/jinda/templates/app/models/jinda/notice.rb

Class Method Summary collapse

Class Method Details

.recent(user_id, ip) ⇒ Object



10
11
12
13
# File 'lib/generators/jinda/templates/app/models/jinda/notice.rb', line 10

def self.recent(user_id, ip)
  where(unread: true, ip: ip).last
  # where(unread: true, user_id: user_id, ip: ip).last
end