Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

19 lines (15 sloc) 0.388 kb
class ParanoidPost
include Mongoid::Document
include Mongoid::Versioning
include Mongoid::Timestamps
include Mongoid::Paranoia
field :title
belongs_to :person
has_and_belongs_to_many :tags
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
Jump to Line
Something went wrong with that request. Please try again.