Sha256: b4f1e2ebaca240da6f5717bcdc7dda12e38df3dbe5d7d2e9c30594284257cc89
Contents?: true
Size: 689 Bytes
Versions: 1
Compression:
Stored size: 689 Bytes
Contents
module DeviseSecurity::Patches module PasswordsControllerCaptcha extend ActiveSupport::Concern included do define_method :create do if valid_captcha_if_defined?(params[:captcha]) self.resource = resource_class.send_reset_password_instructions(params[resource_name]) if successfully_sent?(resource) respond_with({}, :location => new_session_path(resource_name)) else respond_with(resource) end else flash[:alert] = t('devise.invalid_captcha') if is_navigational_format? respond_with({}, :location => new_password_path(resource_name)) end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
devise-security-0.11.1 | lib/devise-security/patches/passwords_controller_captcha.rb |