Class: RegistrationsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- RegistrationsController
- Defined in:
- lib/generators/tailwind_registration/templates/registrations_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/generators/tailwind_registration/templates/registrations_controller.rb', line 7 def create if @user = User.create(user_params) start_new_session_for @user redirect_to root_path, notice: "User account was successfully created" else render :new end end |
#new ⇒ Object
3 4 5 |
# File 'lib/generators/tailwind_registration/templates/registrations_controller.rb', line 3 def new @user = User.new end |