search for: app_server_key

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

2006 Apr 08
3
[Tip] Application Wide Context Howto
...nguish from one another. But since you can store any object in a ruby hash you can store anything you want in this $application_wide_hash. Just make a unique key and store it in the users session. Maybe something like this: key = "#{current_user.id}-#{Time.now}-#{rand} session[:app_server_key] = key $application_wide_hash[key] = SomeObjectOrValueYouWantToStoreInApplicationWideStorage Then on the next request you can get that object back with this: $application_wide_hash[session[:app_server_key]] This approach allows for a very flexible application wide context. It...
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