blob: d2a68225c5b006a2d0f0d04d78c8fd2a802fab3d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
class RegistrationsController < ApplicationController
def new
@user = User.new
end
def create
@user = User.new(user_params)
if @user.save
start_new_session_for @user
redirect_to root_path, notice: "Successfully signed up!"
else
render :new
end
end
private
def user_params
params.require(:user).permit(:email_address, :password, :password_confirmation)
end
end
|