Simplifies process and fields: * In: username * Out: first_name, last_name, phone, nickname, use_nickname? Closes #213
19 lines
370 B
Ruby
19 lines
370 B
Ruby
class Users::RegistrationsController < Devise::RegistrationsController
|
|
|
|
def create
|
|
build_resource(sign_up_params)
|
|
if resource.valid_with_captcha?
|
|
super
|
|
else
|
|
render :new
|
|
end
|
|
end
|
|
|
|
private
|
|
|
|
def sign_up_params
|
|
params.require(:user).permit(:username, :email, :password, :password_confirmation, :captcha, :captcha_key)
|
|
end
|
|
|
|
end
|