I want to do the following: Find all articles with where Time.now
is between article.due_date
and article.due_date - 8.hours
. I'm having a lot of trouble trying to get it right. Any help would be much appreciated.
Thanks!
I want to do the following: Find all articles with where Thanks!
| |||
feedback
|
Who said that algebra was worthless? The two conditions you stated in your question.
Are the same as these two conditions.
You can apply now apply this to a query and/or scope without having to do datetime gymnastics in your database.
| |||||
feedback
|