class Spree::UserRegistrationsController
Public Instance Methods
create()
click to toggle source
# 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) sign_in(:spree_user, resource) session[:spree_user_signup] = true respond_with resource, location: after_sign_up_path_for(resource) else clean_up_passwords(resource) respond_with(resource) do |format| format.html { render :new } end end end
Protected Instance Methods
check_permissions()
click to toggle source
# File lib/controllers/frontend/spree/user_registrations_controller.rb, line 35 def check_permissions authorize!(:create, resource) end
translation_scope()
click to toggle source
# File lib/controllers/frontend/spree/user_registrations_controller.rb, line 31 def translation_scope 'devise.user_registrations' end
Private Instance Methods
spree_user_params()
click to toggle source
# File lib/controllers/frontend/spree/user_registrations_controller.rb, line 41 def spree_user_params params.require(:spree_user).permit(Spree::PermittedAttributes.user_attributes | [:email]) end