tobstarr-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2008-Oct-08 08:33 UTC
BetterNestedSet and Rails Caching
Hi, we have a simple category structure which is using BetterNestedSet. We also use the caching functionality of Rails 2.1. In the development environment config.cache_classes = false config.cache_store = :memory_store this little action def level_test cat = Rails.cache.fetch("category") do Category.first end render :text => "#{cat.level}" end breaks when the cache is hit (the second call to the action) telling me that the Category class does not implement the "level" method. This problem can be fixed turning cache_classes to true. Why is acts_as_nested_set not called initializing the Category class at the second request? Thanx, Tobi --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---