Sha256: 0f15afffd2df7304abc5059c8b8119bc54b34bf4938db7e60664683887189ded
Contents?: true
Size: 608 Bytes
Versions: 1
Compression:
Stored size: 608 Bytes
Contents
module ReallySimpleCaptcha::Captcha module ReverseCaptcha include ActiveSupport::Configurable config_accessor :field_name config.field_name = :reverse_captcha def self.configure(&block) yield config end module ViewHelpers def reverse_captcha_tag content_tag :div, text_field_tag(ReverseCaptcha.field_name, nil, id: "reverse_captcha_#{Time.now.nsec}"), class: 'reverse_captcha', style: 'display: none' end end module ControllerHelpers def reverse_captcha_valid? params[ReverseCaptcha.field_name].blank? end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
really_simple_captcha-0.1.2 | lib/really_simple_captcha/captcha/reverse_captcha.rb |