Class: Hancock::RegistrationsController

Inherits:
Devise::RegistrationsController
  • Object
show all
Includes:
Decorators::Registrations
Defined in:
app/controllers/hancock/registrations_controller.rb

Instance Method Summary collapse

Instance Method Details

#check_recaptchaObject

private :check_recaptcha



5
6
7
8
9
10
11
12
13
14
# File 'app/controllers/hancock/registrations_controller.rb', line 5

def check_recaptcha
  if Hancock.config.recaptcha_support and (!Rails.env.development? or Hancock.config.captcha_on_development)
    unless verify_recaptcha
      self.resource = resource_class.new 
      self.resource.valid?
      @recaptcha_error = "Вы робот?".freeze
      respond_with_navigational(resource) { render :new }
    end
  end
end