Fix Recaptcha
This commit is contained in:
parent
ebbc38cff9
commit
3f9b3de255
3 changed files with 6 additions and 2 deletions
|
@ -36,6 +36,10 @@ private
|
|||
request.format.json?
|
||||
end
|
||||
|
||||
def verify_captcha(options = {})
|
||||
verify_recaptcha options.reverse_merge timeout: 10
|
||||
end
|
||||
|
||||
def render_not_found
|
||||
respond_to do |format|
|
||||
format.html { render status: :not_found, template: 'errors/not_found' }
|
||||
|
|
|
@ -71,7 +71,7 @@ protected
|
|||
end
|
||||
|
||||
def check_captcha
|
||||
return if verify_recaptcha
|
||||
return if verify_captcha
|
||||
|
||||
self.resource = resource_class.new sign_up_params
|
||||
resource.validate
|
||||
|
|
|
@ -28,7 +28,7 @@ class Users::SessionsController < Devise::SessionsController
|
|||
protected
|
||||
|
||||
def check_captcha
|
||||
return if verify_recaptcha
|
||||
return if verify_captcha
|
||||
|
||||
self.resource = resource_class.new sign_in_params
|
||||
render :new
|
||||
|
|
Reference in a new issue