This post will use the example of a basic CMS system. Oddly we couldn't
reproduce this problem in our development environment, only in our
production environment. Here's why...
What steps will reproduce the problem?
1. Say you have the following code in your article model:
scope_out :published, :conditions => ["published_at <?", Time.now]
2. When in production mode, the object is cached, not recompiled, so the
conditions parameter is stored as a literal, not as a date object... so it
will forever search using the date of when the object was first compiled.
I assume a workaround would be to supply some sort of method as the
parameter that returns a date.
Not sure if this is a BUG, per se, but certainly an issue....