Topic: searching datetime

Hey all,
I have a model Post with a datetime posted_on attribute.
What's the best way to find all the posts that were posted x days,
let's say 5 days ago from

thanx in advance


Re: searching datetime

found it:


Re: searching datetime

You can use 5.days.ago instead of Pretty cool huh? smile

Railscasts - Free Ruby on Rails Screencasts