Sha256: 379f1ab9d7e448cda2bfef97859d7cb9c4bc587c28d947f88da21d0dd407bf9e

Contents?: true

Size: 570 Bytes

Versions: 3

Compression:

Stored size: 570 Bytes

Contents

class Auth::RegisteredUserController < ApplicationController
  include RedirectIfAuthenticated

  skip_authenticate

  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)

    Current.auth.login user

    redirect_to dashboard_path
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
kaze-0.8.0 stubs/hotwire/app/controllers/auth/registered_user_controller.rb
kaze-0.7.0 stubs/hotwire/app/controllers/auth/registered_user_controller.rb
kaze-0.6.0 stubs/hotwire/app/controllers/auth/registered_user_controller.rb