Class: Pbw::RegistrationsController
- Inherits:
-
Devise::RegistrationsController
- Object
- Devise::RegistrationsController
- Pbw::RegistrationsController
- Defined in:
- app/controllers/pbw/registrations_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'app/controllers/pbw/registrations_controller.rb', line 5 def create self.resource = User.new(params) if resource.save && resource.send_registration_email unwrapped = params params[:user] = unwrapped Pbw.user_lifecycle_class.after_signup(resource) sign_in(:user, resource) render json: resource else render json: resource.errors..to_json, status: :unprocessable_entity end end |