signed_in? breaks after database dump
Closed this issue · 4 comments
calebhearth commented
- Have a signed in user
- Drop the database and recreate
- The signed_in? helper breaks.
This is probably because the warden cookie still thinks you're signed in, and so when warden.user tries to get the user in current_user (which I'm sure is also broken), there isn't on in the db to be found.
calebhearth commented
Request
Parameters:
None
Toggle session dump
_csrf_token: OMITTED
session_id: OMITTED
warden.user.default.key: 1
Toggle env dump
HTTP_ACCEPT: "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
HTTP_ACCEPT_CHARSET: "ISO-8859-1,utf-8;q=0.7,*;q=0.3"
HTTP_ACCEPT_ENCODING: "gzip,deflate,sdch"
HTTP_ACCEPT_LANGUAGE: "en-US,en;q=0.8"
HTTP_CACHE_CONTROL: "max-age=0"
REMOTE_ADDR: "127.0.0.1"
halogenandtoast commented
Did you try this on master. I think I already had a fix for this:
Use find_by_id instead of find so invalid sessions don’t cause apps to crash
halogenandtoast commented
If this fixes your problem, I'll release 0.0.4
halogenandtoast commented
This is indeed fixed in the 0.0.4 release.