Skip to content
Browse files

Assigns object to self.resource, changing variable scope.

  • Loading branch information...
1 parent 8f4b065 commit 564e588f5e7ae3f0a1312a63b26870f0b35ec3ce @adammcnamara adammcnamara committed Oct 10, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 app/controllers/devise/sessions_controller.rb
View
4 app/controllers/devise/sessions_controller.rb
@@ -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)

0 comments on commit 564e588

Please sign in to comment.
Something went wrong with that request. Please try again.