Marnen Laibow-Koser wrote: > Mk 27 wrote: >> Marnen Laibow-Koser wrote: >> >>> In this case, you should probably be using a local or @instance variable >>> in the controller. >> >> *There is no way to do that in rails*. > > Well, if you're so sure of that, why are you asking for help? :)
Because, as they say, it is like pulling teeth sometimes :) Actually, I didn't really believe that, but after doing a little more research, I learned that in a production environment a class variable will not work either, and that it is true: *YOU CANNOT DO THAT IN RAILS* ie, you will have to write that data to a file of some sort, and use some kind of per user key to identify it. Which sucks, but I guess that is life. > Do I understand correctly that you'd like to cache a database query in > the controller between requests? If so, perhaps a @@class variable is > the way to go here. Or maybe Rails' built-in caching would do what you > need. Thanks for ringing my head Marnen re: class variables. I only skimmed thru the pickaxe book on the web last week. My stupidity. Perhaps this issue has been solved with the "built-in caching"? The aforementioned "research" was another, similar forum thread from 2006. Hopefully -- then I will have to admit *YOU CAN DO THAT IN RAILS* So thanks again -- MK -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 [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-talk?hl=en -~----------~----~----~----~------~----~------~--~---

