Use sign_in and authenticate methods.

This commit is contained in:
José Valim
2009-10-18 15:01:56 -02:00
parent 9051d842c0
commit b0a2da72b5
7 changed files with 34 additions and 37 deletions

View File

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