Re: How to pass HTML Field value to Ruby code in view

Greg Donald
Wed, 01 Apr 2009 21:51:01 -0000

On Wed, Apr 1, 2009 at 1:24 AM, Tam Kbe
<rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>
wrote:
> I need to get a value of HTML Hidden field inside my Ruby Code in view:
> I''m storing session variable name inside hidden field which I need
to
> access from different blocks of Ruby code:
>
> <% if sessions[VAR_NAME].nil? %>

Rails sessions are called "session", singular.

Session keys are symbols, not constants.

session[:var]



--
Greg Donald
http://destiney.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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---