Sunday, November 18, 2012

[Rails] Re: Global variables and assigning the values

> Sounds like you want to add this as a parameter to the action, for
> example game_pick_page_path(:test => 1) which will cause params[:test]
> to be set to 1. If you want to remember the value without storing it
> in the database, use the session (set session[:foo]) rather than a
> global - a global would share its value across all users of the site
> and won't work consistently if you have more than 1 passenger/unicorns
> instance
>
> Fred

That makes alot of sense... but how do i use the (set session[:foo]).
How do i define it in the controller and view?

--
Posted via http://www.ruby-forum.com/.

--
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate