Fix redundant assignment of self.resource in Devise::RegistrationsController
Devise::RegistrationsController#create set self.resource to the return value of build_resource--which is nil, because build_resource sets self.resource to an actual resource object. This caused attempting to save the resource (two lines down) to fail with "undefined method `save' on nil:NilClass."
This commit is contained in:
parent
ab77e08690
commit
545a5cec3b
|
@ -10,7 +10,7 @@ class Devise::RegistrationsController < DeviseController
|
|||
|
||||
# POST /resource
|
||||
def create
|
||||
self.resource = build_resource(sign_up_params)
|
||||
build_resource(sign_up_params)
|
||||
|
||||
if resource.save
|
||||
if resource.active_for_authentication?
|
||||
|
|
Loading…
Reference in New Issue