Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

UserSession.create(user) returns unauthorized_record #325

giangnguyennet opened this Issue Jul 20, 2012 · 1 comment


None yet
1 participant

I have the exactly same problem at the moment as this one anyway I'm creating a new issue report as that one was 2 years old.

us = UserSession.create(user, true)
logger.info us.inspect # => #<UserSession: {:unauthorized_record=>"<protected>"}>

and no current_user created.

My persistence_token are not blank for any records.

I'm using Rails 3.1.3, Ruby 1.9.2-p290, Authlogic 3.1.0

Any ideas?

Finally I got this solved by moving the code to create a new session into Model instead of Controller. Not sure why but works though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment