I am using devise and when a user changes a password the site logs them out. I read online that adding the sign_in will do the trick but not working and the user gets logged out when a password change. Here is my code
if @user.errors[:base].empty? and @user.update_attributes(params[:user])
sign_in(current_user, :bypass => true)
flash[:success] = "User account has been successfully updated"
redirect_to edit_user_path(params[:site_id], @user)
else
render :action => :edit, :status => :unprocessable_entity
end
I was assuming that this would work but regardless of what i do i still get logged out....anything missing or maybe one devise setting is off...any help would be appreciated