Module: EasyCaptcha::ModelHelpers::InstanceMethods

Defined in:
lib/easy_captcha/model_helpers.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#captchaObject

:nodoc:



18
19
20
# File 'lib/easy_captcha/model_helpers.rb', line 18

def captcha  #:nodoc:
  ""
end

#captcha_valid?Boolean Also known as: valid_captcha?

validate captcha

Returns:

  • (Boolean)


23
24
25
# File 'lib/easy_captcha/model_helpers.rb', line 23

def captcha_valid?
  errors.add(:captcha, :invalid) if @captcha.blank? or @captcha_verification.blank? or @captcha.to_s.upcase != @captcha_verification.to_s.upcase 
end