Sha256: 64a4df7ebaa4594216a1a9bef1e876350e4edd9613dc51ab8394130ac3454662
Contents?: true
Size: 702 Bytes
Versions: 9
Compression:
Stored size: 702 Bytes
Contents
# frozen_string_literal: true module DeviseSecurity::Patches module UnlocksControllerCaptcha extend ActiveSupport::Concern included do define_method :create do if valid_captcha_if_defined?(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
9 entries across 9 versions & 1 rubygems