Class: Spree::UserRegistrationsController
- Inherits:
-
Devise::RegistrationsController
- Object
- Devise::RegistrationsController
- Spree::UserRegistrationsController
- Includes:
- Core::ControllerHelpers::Auth, Core::ControllerHelpers::Common, Core::ControllerHelpers::Currency, Core::ControllerHelpers::Locale, Core::ControllerHelpers::Order, Core::ControllerHelpers::Store, LocaleUrls, SpreeI18n::ControllerLocaleHelper
- Defined in:
- lib/controllers/frontend/spree/user_registrations_controller.rb
Instance Method Summary collapse
-
#cancel ⇒ Object
GET /resource/cancel Forces the session data which is usually expired after sign in to be expired now.
-
#create {|resource| ... } ⇒ Object
POST /resource/sign_up.
-
#destroy ⇒ Object
DELETE /resource.
-
#edit ⇒ Object
GET /resource/edit.
-
#new ⇒ Object
GET /resource/sign_up.
-
#update ⇒ Object
PUT /resource.
Instance Method Details
#cancel ⇒ Object
GET /resource/cancel Forces the session data which is usually expired after sign in to be expired now. This is useful if the user wants to cancel oauth signing in/up in the middle of the process, removing all OAuth session data.
75 76 77 |
# File 'lib/controllers/frontend/spree/user_registrations_controller.rb', line 75 def cancel super end |
#create {|resource| ... } ⇒ Object
POST /resource/sign_up
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/controllers/frontend/spree/user_registrations_controller.rb', line 31 def create @user = build_resource(spree_user_params) resource.skip_confirmation_notification! if Spree::Auth::Config[:confirmable] resource_saved = resource.save yield resource if block_given? if resource_saved if resource.active_for_authentication? :notice, :signed_up sign_up(resource_name, resource) session[:spree_user_signup] = true resource.send_confirmation_instructions(current_store) if Spree::Auth::Config[:confirmable] redirect_to_checkout_or_account_path(resource) else :notice, :"signed_up_but_#{resource.}" expire_data_after_sign_in! resource.send_confirmation_instructions(current_store) if Spree::Auth::Config[:confirmable] respond_with resource, location: after_inactive_sign_up_path_for(resource) end else clean_up_passwords(resource) render :new, status: :unprocessable_entity end end |
#destroy ⇒ Object
DELETE /resource
66 67 68 |
# File 'lib/controllers/frontend/spree/user_registrations_controller.rb', line 66 def destroy super end |
#edit ⇒ Object
GET /resource/edit
56 57 58 |
# File 'lib/controllers/frontend/spree/user_registrations_controller.rb', line 56 def edit super end |
#new ⇒ Object
GET /resource/sign_up
25 26 27 28 |
# File 'lib/controllers/frontend/spree/user_registrations_controller.rb', line 25 def new super @user = resource end |
#update ⇒ Object
PUT /resource
61 62 63 |
# File 'lib/controllers/frontend/spree/user_registrations_controller.rb', line 61 def update super end |