Class: Hancock::RegistrationsController
- Inherits:
-
Devise::RegistrationsController
- Object
- Devise::RegistrationsController
- Hancock::RegistrationsController
- Includes:
- Decorators::Registrations
- Defined in:
- app/controllers/hancock/registrations_controller.rb
Instance Method Summary collapse
-
#check_recaptcha ⇒ Object
private :check_recaptcha.
Instance Method Details
#check_recaptcha ⇒ Object
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 sign_up_params self.resource.valid? @recaptcha_error = "Вы робот?".freeze (resource) { render :new } end end end |