Class: RegistrationController

Inherits:
ApplicationController show all
Defined in:
app/controllers/registration_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#not_authenticated, #set_locale

Instance Method Details

#createObject


8
9
10
11
12
13
14
15
16
# File 'app/controllers/registration_controller.rb', line 8

def create
  @user = User.new(user_params)
  if @user.save
    (@user)
    redirect_back_or_to root_path, notice: "User was successfully updated!"
  else
    render :new
  end
end

#newObject


4
5
6
# File 'app/controllers/registration_controller.rb', line 4

def new
  @user = User.new
end