I am having a problem saving something into a session variable and
struggling to make any progress.
I have a login screen that I want to display differing logo''s
dependent on the URL that people use.
For example, I have http://127.0.0.1:3000/account/login/logo1 or
http://127.0.0.1:3000/account/login/logo2 and in the view I inspect
params[:id] to determine the logo to display. This is working.
However, I now need to show the same logo on the logout screen, so I
thought I would save the details in a session variable in my login
method of AccountController. As follows:
session[:logo] = params[:id]
However this doesn''t work. When the view executes and i check
session[:logo] it is empty. If I move the above line into the view
then the session variable is saved, but it doesn''t seem the right
place to be doing it.
What am I doing wrong?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---