Files
nairobi/app/controllers/users/registrations_controller.rb
kikito de73eac2d0 Moves the registrations controller to users/registrations
This is necessary because rails gets confused when it has a a “root”
registration_controller and another non-root one. The non-root one uses
the views from the root.
2015-08-17 01:16:07 +02:00

21 lines
479 B
Ruby

class Users::RegistrationsController < Devise::RegistrationsController
include RecaptchaHelper
def create
if verify_captcha?(resource)
super
else
build_resource(sign_up_params)
flash.now[:alert] = t('recaptcha.errors.verification_failed')
render :new
end
end
private
def sign_up_params
params.require(:user).permit(:first_name, :last_name, :email, :password, :password_confirmation, :use_nickname, :nickname)
end
end