I am using the following code in my controller:
@monday = (Time.now).at_beginning_of_week
@friday = 5.days.since(@monday)-1.second
@sent_emails = ContactEmail.all(:conditions => ['date_sent >= ? and date_sent <= ?', @monday, @friday])
Although it works fine on my local sqlite, I have an "operator does not exist timestamp without timezone = integer" error.
I'm not exactly clear what to change.
Ideas?
Thanks.