On May 20, 2:14 pm, asymmetric <[email protected]> wrote: > then i have a controller, treasurehunt_controller, with an action, > called load, which does some things (loads a treasurehunt and blah > blah blah). in the load method, i create a treasurehunt object, thus > supposedly incrementing the @@idno variable. > > the problem is i'm not (incrementing the variable). > > when i debug the app (using a flash that gets displayed in my layout), > the @@idno variable is always 1, even after subsequent calls of the > load action. > > does anybody know why?
in development mode classes are reloaded between requests, so on the second request you get a brand new TreasureHunt class, with a brand new @@idno variable Fred > > do i need to store that state somewhere else? > i'm pretty confused. > > thanks > asy --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

