Sha256: dc68f299533277fde19386d137ab312aaf1842baf33145201acfe799c8716f31

Contents?: true

Size: 524 Bytes

Versions: 2

Compression:

Stored size: 524 Bytes

Contents

class Auth::RegisteredUserController < ApplicationController
  skip_authentication

  layout "guest"

  def new
    @form = Auth::RegisterForm.new

    render "auth/register"
  end

  def create
    @form = Auth::RegisterForm.new params.permit(:name, :email, :password, :password_confirmation)

    return render "auth/register", status: :unprocessable_entity if @form.invalid?

    user = User.create(name: @form.name, email: @form.email, password: @form.password)

    login user

    redirect_to dashboard_path
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
kaze-0.4.0 stubs/hotwire/app/controllers/auth/registered_user_controller.rb
kaze-0.3.0 stubs/hotwire/app/controllers/auth/registered_user_controller.rb