Sha256: 1e3453350d992acc81b5e02f9746cdabe7e7ff3da92e5e5f78f132ecda15c039
Contents?: true
Size: 387 Bytes
Versions: 10
Compression:
Stored size: 387 Bytes
Contents
# -*- encoding : utf-8 -*- class Jinda::Notice include Mongoid::Document include Mongoid::Timestamps field :message, :type => String field :unread, :type => Boolean field :ip, :type => String belongs_to :user, :class_name => "Jinda::User" def self.recent(user_id, ip) where(unread: true, ip: ip).last # where(unread: true, user_id: user_id, ip: ip).last end end
Version data entries
10 entries across 10 versions & 1 rubygems