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?