On Nov 9, 4:08 pm, Geoff B <[EMAIL PROTECTED]> wrote: > Agreed -- this works fine in production. The issues we're discussing > are only occur when config.cache_classes = true (i.e., development.)
Correction: I meant to say, when config.cache_classes = false (i.e., development.) Anyway, here's a specific example of the issue, using David Rice's example app from #1290 -- We set MONKEY_ONE = Monkey.first in an initializer (if we use Rails.cache with :memory_store back-end instead of a constant, the result is the same.) In the view: <%= case MONKEY_ONE when Monkey "a monkey" else "not a monkey" end %> With cache_classes = true (i.e., production), we get "a monkey" every time we hit the page, as expected. With cache_classes = false (i.e., development), we get "a monkey" the first time we hit the page, and "not a monkey" on subsequent requests. This occurs whether or not we apply Tom Lea's patch. So, the question is, if it's impossible for us to tweak development reloading so that we can get "a monkey" every time we hit the page, is it okay to get one result the first time you hit the page, and a different result on subsequent requests? Or would it be better to get "a monkey" on the first request, and a "ZombieClassError" when you reloaded the page? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
