I initially set up acts_as_authenticated to require a user login before
accessing and updating pages on my recipe site. This worked fine with no
problems with the user session.
Now, I have changed the setup so that a few pages are available to the
public, while others that involve create/update/delete actions require a
user that is logged in. So I created a login form as a partial to
every single page. The sign in form displays if not logged in; if the
is logged in it will display a welcome message to the user.
Now I’m encountering problems where my session[:user] variable gets
nil whenever I do a post request. I still have the session, but I just
the variable, and find myself having to explicitly send the user ID as
hidden input and re-assign the session[:user] variable. Has anyone
encountered this problem, or have any idea why this would be happening?
Thanks in advance.
View this message in context:
Sent from the RubyOnRails Users mailing list archive at Nabble.com.