Class: RegistrationsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- RegistrationsController
- Defined in:
- app/controllers/registrations_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'app/controllers/registrations_controller.rb', line 8 def create @user = User.new(user_params) Studio.configure_new_user.call(@user) rescue_and_log(target: @user) do @user.save! set_app_session(@user) redirect_to root_path, notice: Studio..call(@user) end rescue StandardError => e render :new, status: :unprocessable_entity end |
#new ⇒ Object
4 5 6 |
# File 'app/controllers/registrations_controller.rb', line 4 def new @user = User.new end |