Class: RailsSimpleAuth::RegistrationsController

Inherits:
BaseController
  • Object
show all
Defined in:
app/controllers/rails_simple_auth/registrations_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



17
18
19
20
21
22
23
24
25
# File 'app/controllers/rails_simple_auth/registrations_controller.rb', line 17

def create
  @user = user_class.new(registration_params)

  if @user.save
    after_successful_registration
  else
    render :new, status: :unprocessable_content
  end
end

#newObject



12
13
14
15
# File 'app/controllers/rails_simple_auth/registrations_controller.rb', line 12

def new
  redirect_to resolve_path(:after_sign_in_path) if user_signed_in?
  @user = user_class.new
end