mirror of
https://github.com/heartcombo/devise.git
synced 2026-01-10 15:28:18 -05:00
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:
@@ -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?
|
||||
|
||||
Reference in New Issue
Block a user