adds recaptcha validation to registration controller [#45] [#45]

This commit is contained in:
rgarcia
2015-07-28 18:31:53 +02:00
parent 6a6804f73b
commit c5bfc9420f
2 changed files with 14 additions and 1 deletions

View File

@@ -1,5 +1,16 @@
class RegistrationsController < Devise::RegistrationsController
def create
if verify_recaptcha
super
else
build_resource(sign_up_params)
flash.now[:alert] = t('recaptcha.errors.verification_failed')
render :new
end
end
private
def sign_up_params