Why does current_user session become nil when updating a user?
问题 I'm using Devise and CanCan for user authentication and administrating roles restricting access to parts of my Rails 4 app for certain users. I've run into some problems with updating a user. The update works fine and the user object in the db get updated as it should, but my user session is lost on the following redirect_to my user show action. current_user becomes nil which means that CanCan restricts the access to the user show action. Why does current_user become nil after update, when