Date Range SQL clause in ruby

Here is how to do it:

Date range to SQL clause

(6.months.ago.to_date..1.year.ago.to_date).to_s(:db) => ?BETWEEN ?2005-07-27? AND ?2005-01-22??

taken from here

Comments