How do I use .find for the last five days in ruby on rails?

Posted by Angela on Stack Overflow See other posts from Stack Overflow or by Angela
Published on 2010-05-07T04:01:38Z Indexed on 2010/05/07 4:08 UTC
Read the original article Hit count: 153

Filed under:
|
|

Have a model called contact_email.date_sent

I want to be able to run a report which displays all those where the date_sent range is between date.today and date.today 5 days ago.

I assume I use something like

@send_emails = Contact_Email.find(:conditions=> ???)

But not clear what exactly is the best way. Thanks!

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about find