From: Brian Candler Date: 2009-01-22T19:02:15+09:00 Subject: Re: How to change ruby's global variable through onclick ev Stefan Rusterholz wrote: > On another note: you do NOT want a global variable there. A global will > be used not just for that single user but for all happening to be served > by the same instance of ruby. And in most Rails deployments, there are multiple processes, so a global variable changed in one will not affect another. You probably want to change state in the *session*, which is accessible to any process handling data on behalf of the same user. session[:foo] = "bar" (By default the session is stored in a cookie, so the total size is limited to 4K. If you need to store more than this, select a different session store model) -- Posted via http://www.ruby-forum.com/.