Sha256: dff4c0f18ce0d4532fe369d2092eaf14d841a1b7fb122d570d9bff0095cf9501
Contents?: true
Size: 332 Bytes
Versions: 10
Compression:
Stored size: 332 Bytes
Contents
class Post include Mongoid::Document include Mongoid::Versioning include Mongoid::Timestamps field :title belongs_to_related :person named_scope :recent, where(:created_at => { "$lt" => Time.now, "$gt" => 30.days.ago }) class << self def old where(:created_at => { "$lt" => 30.days.ago }) end end end
Version data entries
10 entries across 10 versions & 2 rubygems