Skip to content
This repository

UserSession.create(user) returns unauthorized_record #325

ndgiang84 opened this Issue · 1 comment

1 participant

Giang Kenneth Nguyen Duc
Giang Kenneth Nguyen Duc

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) 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?

Giang Kenneth Nguyen Duc

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.

Giang Kenneth Nguyen Duc ndgiang84 closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.