Module: Captcha::Model::ActMethods

Defined in:
lib/captcha/model.rb

Instance Method Summary collapse

Instance Method Details

#acts_as_captcha(options = {}) ⇒ Object



8
9
10
11
12
13
14
15
# File 'lib/captcha/model.rb', line 8

def acts_as_captcha(options={})
  extend ClassMethods
  include InstanceMethods
  attr_reader :captcha, :known_captcha
  cattr_accessor :captcha_options
  self.captcha_options = options
  validate :captcha_must_match_known_captcha
end