class Article < ActiveRecord::Base

  # Find all articles in the given date range based on the published_at field
...

Ruby Building a dynamic date range

by claytonlz, May 08, 2008 23:45, 2 refactorings, tagged with date range, date

I've got a route that handl...

E17d936d4535519716b6e810052feac5 Talk
has_many :expenses, :dependent => :destroy do
  def for_week(day)
    find(:all, :conditions => { :spent_at => day.to_time.beginning_of_week.to_date..(day.to_time.beginning_of_week.to_date + 6)})
...

Ruby Finding all in a date range...

by Barry Hess, November 02, 2007 15:15, 1 refactoring, tagged with date range, association proxy

So my User has an associati...

0218fde3a78fadbadb566bdb40d7b0dd Talk