Module: DeviseSecurity::Patches

Defined in:
lib/devise-security/patches.rb,
lib/devise-security/patches/controller_captcha.rb,
lib/devise-security/patches/unlocks_controller_captcha.rb,
lib/devise-security/patches/sessions_controller_captcha.rb,
lib/devise-security/patches/controller_security_question.rb,
lib/devise-security/patches/passwords_controller_captcha.rb,
lib/devise-security/patches/confirmations_controller_captcha.rb,
lib/devise-security/patches/registrations_controller_captcha.rb,
lib/devise-security/patches/unlocks_controller_security_question.rb,
lib/devise-security/patches/passwords_controller_security_question.rb,
lib/devise-security/patches/confirmations_controller_security_question.rb

Defined Under Namespace

Modules: ConfirmationsControllerCaptcha, ConfirmationsControllerSecurityQuestion, ControllerCaptcha, ControllerSecurityQuestion, PasswordsControllerCaptcha, PasswordsControllerSecurityQuestion, RegistrationsControllerCaptcha, SessionsControllerCaptcha, UnlocksControllerCaptcha, UnlocksControllerSecurityQuestion

Class Method Summary collapse

Class Method Details

.applyObject


9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/devise-security/patches.rb', line 9

def apply
  Devise::PasswordsController.send(:include, Patches::ControllerCaptcha) if Devise.captcha_for_recover || Devise.security_question_for_recover
  Devise::UnlocksController.send(:include, Patches::ControllerCaptcha) if Devise.captcha_for_unlock || Devise.security_question_for_unlock
  Devise::ConfirmationsController.send(:include, Patches::ControllerCaptcha) if Devise.captcha_for_confirmation

  Devise::PasswordsController.send(:include, Patches::ControllerSecurityQuestion) if Devise.security_question_for_recover
  Devise::UnlocksController.send(:include, Patches::ControllerSecurityQuestion) if Devise.security_question_for_unlock
  Devise::ConfirmationsController.send(:include, Patches::ControllerSecurityQuestion) if Devise.security_question_for_confirmation

  Devise::RegistrationsController.send(:include, Patches::ControllerCaptcha) if Devise.
  Devise::SessionsController.send(:include, Patches::ControllerCaptcha) if Devise.
end