Mike Kogan wrote:> I am having some weird behavior I don''t get.
>
> Within a controller/class I have a method "test1" that sets
> @session[''varname'']="foo". the view for
test1.rhtml properly prints the
> value as "foo".
>
> Next I click a link to method "test2" within the same class (same
> browser sesion etc). test2 attempts to access
@session[''varname''] and
> finds it nil. DANGIT
>
> I found if I were to put in "test1" method a redirect_to
"test2" that
> test2 is able to access the data properly.
>
> What am I missing about how session variables work?
Somebody posted here the other day that "@session[]" is deprecated.
He
suggested switching to just "session[]" and thought that would solve
the
OP''s problem. I didn''t see the thread after that so I
don''t know if it
was a successful solution or not. Worth a try. Please let us know.
thanks,
jp
--
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-/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
-~----------~----~----~----~------~----~------~--~---