Sha256: 6fd2480fd06da437b8f05f0850d30853f81c3d17d2eb3751d5f82e378c97c72d
Contents?: true
Size: 411 Bytes
Versions: 5
Compression:
Stored size: 411 Bytes
Contents
class ParanoidPost include Mongoid::Document include Mongoid::Versioning include Mongoid::Timestamps include Mongoid::Paranoia field :title referenced_in :person references_many :tags, :stored_as => :array 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
5 entries across 5 versions & 2 rubygems