Sha256: e3721962bf8022d65cf2d034f35f616e370dd83ef4abce3be3edc11466595b3e
Contents?: true
Size: 674 Bytes
Versions: 11
Compression:
Stored size: 674 Bytes
Contents
module DeviseSecurityExtension::Patches module UnlocksControllerCaptcha extend ActiveSupport::Concern included do define_method :create do if valid_captcha? params[:captcha] self.resource = resource_class.send_unlock_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_unlock_path(resource_name)) end end end end end
Version data entries
11 entries across 11 versions & 1 rubygems