Sign user in automatically after confirming or changing it's password

This commit is contained in:
Carlos A. da Silva
2009-10-18 10:36:20 -02:00
parent 1f9718c120
commit 8d85db3b57
7 changed files with 41 additions and 7 deletions

View File

@@ -28,8 +28,9 @@ class PasswordsController < ApplicationController
self.resource = resource_class.reset_password!(params[resource_name])
if resource.errors.empty?
sign_in_automatically(resource, resource_name)
set_flash_message :success, :updated
redirect_to new_session_path(resource_name)
redirect_to root_path
else
render :edit
end