I am trying to compare dates for an app in rails. I have tried this link Comparing dates in rails. But this is not what I want, suppose I have a filter according to dates, then I am doing
<% jobs = @user.jobs.where(:curr_date => (Date.today))%>
Here, curr_date is a "date" attribute chosen by me.
This code works for entries which have today's date, but if I want all entries which have date between today and a week before, what should I do?
Thanx! :)