Module: EasyCaptcha::ModelHelpers::InstanceMethods
- Defined in:
- lib/easy_captcha/model_helpers.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#captcha ⇒ Object
:nodoc:.
-
#captcha_valid? ⇒ Boolean
(also: #valid_captcha?)
validate captcha.
Instance Method Details
#captcha ⇒ Object
: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
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 |