module Captchah

Constants

VERSION

Public Class Methods

included(base) click to toggle source
# File lib/captchah.rb, line 18
def self.included(base)
  return unless base.respond_to?(:helper_method)

  return unless base.ancestors.include?(ActionController::Base)

  base.helper_method(:captchah_tag, :verify_captchah)
end

Public Instance Methods

captchah_tag(*args) click to toggle source
# File lib/captchah.rb, line 26
def captchah_tag(*args)
  Generators::Captcha.call(*args)
end
verify_captchah() click to toggle source
# File lib/captchah.rb, line 30
def verify_captchah
  Verifier.call(params[:captchah])
end