search for: daily_stats

Displaying 1 result from an estimated 1 matches for "daily_stats".

2010 Nov 05
2
ActiveRecords queries: .where vs .find
I have a dataset, which contains a day column that I would like to retrieve results on. Is there any reason why daily_stats.where(''day = Date(?)'', dte).first returns and empty set, daily_stats.find(:first, :conditions => [''date(day) = ?'', dte]) returns the correct data and daily_stats.where({:created_at => (date.midnight - 1.day)..date.midnight}).first returns the wrong data(ret...