From: Nick Brown Date: 2010-02-28T12:25:41+09:00 Subject: Re: scope question > But it's generally considered good form to not use global variables in > the first place. There's almost always a way to avoid using them. The > danger of using them is that if you use a global variable with your > code, and someone else uses a global variable of the same name in their > code, the two bits of code will both break if they are ever run > together. Raul: I believe it would also be bad form to hit the database unnecessarily with every pageview. If It's bad form to cache data in a variable that is visible to every page, then I don't want to be good ;-) Is there a "better" way to do this than @@? Why do constants have different scopes than regular variables? -- Posted via http://www.ruby-forum.com/.