Rails 4 + Devise: sign_in(user) method not working, does not set current_user
I figured it out. In my @checkout
form object, I update the guest_user
s attributes and save it when I call @checkout.save
. I think devise has to sign in the most recent version of guest_user, so I had to add a guest_user.reload
before sign_in(guest_user)
In short, reload your user (user.reload
) before signing it in.