Class: Spree::UserRegistrationsController

Inherits:
Devise::RegistrationsController
  • Object
show all
Includes:
Core::ControllerHelpers::Auth, Core::ControllerHelpers::Common, Core::ControllerHelpers::Order, Core::ControllerHelpers::Store
Defined in:
lib/controllers/frontend/spree/user_registrations_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/controllers/frontend/spree/user_registrations_controller.rb', line 14

def create
  build_resource(spree_user_params)
  if resource.save
    set_flash_message(:notice, :signed_up)
    (:spree_user, resource)
    session[:spree_user_signup] = true
    respond_with resource, location: (resource)
  else
    clean_up_passwords(resource)
    respond_with(resource) do |format|
      format.html { render :new }
    end
  end
end