Module: DeviseSecurityExtension::Patches

Defined in:
lib/devise_security_extension/patches.rb,
lib/devise_security_extension/patches/unlocks_controller_captcha.rb,
lib/devise_security_extension/patches/sessions_controller_captcha.rb,
lib/devise_security_extension/patches/passwords_controller_captcha.rb,
lib/devise_security_extension/patches/confirmations_controller_captcha.rb,
lib/devise_security_extension/patches/registrations_controller_captcha.rb,
lib/devise_security_extension/patches/unlocks_controller_security_question.rb,
lib/devise_security_extension/patches/passwords_controller_security_question.rb,
lib/devise_security_extension/patches/confirmations_controller_security_question.rb

Defined Under Namespace

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

Class Method Summary collapse

Class Method Details

.applyObject



13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/devise_security_extension/patches.rb', line 13

def apply
  Devise::PasswordsController.send(:include, Patches::PasswordsControllerCaptcha) if Devise.captcha_for_recover or Devise.security_question_for_recover
  Devise::UnlocksController.send(:include, Patches::UnlocksControllerCaptcha) if Devise.captcha_for_unlock or Devise.security_question_for_unlock
  Devise::ConfirmationsController.send(:include, Patches::ConfirmationsControllerCaptcha) if Devise.captcha_for_confirmation

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

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