Assigns object to self.resource, changing variable scope.

This commit is contained in:
Adam McNamara
2012-10-10 10:01:35 -04:00
parent 8f4b06542e
commit 564e588f5e

View File

@@ -5,14 +5,14 @@ class Devise::SessionsController < DeviseController
# GET /resource/sign_in
def new
resource = build_resource(nil, :unsafe => true)
self.resource = build_resource(nil, :unsafe => true)
clean_up_passwords(resource)
respond_with(resource, serialize_options(resource))
end
# POST /resource/sign_in
def create
resource = warden.authenticate!(auth_options)
self.resource = warden.authenticate!(auth_options)
set_flash_message(:notice, :signed_in) if is_navigational_format?
sign_in(resource_name, resource)
respond_with resource, :location => after_sign_in_path_for(resource)