9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# File 'app/controllers/action_auth/registrations_controller.rb', line 9
def create
@user = User.new(user_params)
if @user.save
if ActionAuth.configuration.verify_email_on_sign_in
send_email_verification
redirect_to sign_in_path, notice: "Welcome! You have signed up successfully. Please check your email to verify your account."
else
session_record = @user.sessions.create!
cookies.signed.permanent[:session_token] = { value: session_record.id, httponly: true }
redirect_to sign_in_path, notice: "Welcome! You have signed up successfully"
end
else
render :new, status: :unprocessable_entity
end
end
|