search for: application_wide_hash

Displaying 2 results from an estimated 2 matches for "application_wide_hash".

2006 Apr 08
3
[Tip] Application Wide Context Howto
...t the slave library here: http://codeforpeople.com/lib/ruby/slave/slave-0.0.0/README http://codeforpeople.com/lib/ruby/slave/slave-0.0.0.tgz Now lets publish a simple hash that we can use application wide. Put the following in your environment.rb file so it starts up when rails starts up. $application_wide_hash = Slave.new(Hash.new).object Thats all. Now you can use $application_wide_hash anywhere in your rails apps and it will behave just like a hash. So you are still responsible for making suitable hash keys that you can use between requests and still distinguish from one another. But since you...
2006 Apr 11
4
Managing "application scope" data - best practices
All, I have some data that I need to be able to see across the application. For J2EE people out there, I need something that I want to have available in the "application scope" of my app. What is the best way to handle this? I''m trying to access a class variable that I created in my controller from my view (to no avail). Create a class variable in my helper class and use