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? :) > The database I am working with > is not modifiable via the interface (there is no new or create method). That is irrelevant. > I would use an instance variable (populated by the list method), but > when I call another method referencing this variable, it is no longer > populated: [...] > Any suggestions? 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. Best, -- Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org -- 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 rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---