My favorites | Sign in
Project Home Wiki Issues Source
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 15: non-dynamic problems
1 person starred this issue and may be notified of changes. Back to list
Status:  New
Owner:  ----


Sign in to add a comment
 
Reported by bernie.k...@gmail.com, Jan 23, 2008
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....
Sign in to add a comment

Powered by Google Project Hosting