Sha256: e73d235fb2e24c1223f0ea376fd3aee90fa7ae7c92ae85756464b7776abe6601
Contents?: true
Size: 456 Bytes
Versions: 10
Compression:
Stored size: 456 Bytes
Contents
# frozen_string_literal: true module DeviseSecurity::Patches module ControllerCaptcha extend ActiveSupport::Concern included do prepend_before_action :check_captcha, only: [:create] end private def check_captcha return if valid_captcha_if_defined?(params[:captcha]) flash[:alert] = t('devise.invalid_captcha') if is_navigational_format? respond_with({}, location: url_for(action: :new)) end end end
Version data entries
10 entries across 10 versions & 1 rubygems