All pastes #804161 Raw Edit

Untitled

public text v1 · immutable
·published 2007-12-03 04:31 UTC
rendered paste body
class Tag << ActiveRecord::Base 
... 

  has_many :taggings, :dependent => :destroy do
    def since(date)
      find(:all, :conditions => ["created_at ? >=", date])
    end
    def between(date1, date2)
      find(:all, :conditions => ["created_at between ? and ?", date1, date2])
    end
  end

end