Permalink
Browse files

More sensible defaults for error handling and messaging

  • Loading branch information...
1 parent cc8dbb3 commit 3615b3d30b04ca8ed6466b2416cbef947bbb2bf2 Philip Nash committed with ambethia Sep 23, 2009
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/recaptcha/verify.rb
View
@@ -23,7 +23,7 @@ def verify_recaptcha(options = {})
flash[:recaptcha_error] = error
if model
model.valid?
- model.errors.add :captcha, options[:message] || "Word verification response is incorrect, please try again."
+ model.errors.add :base, options[:message] || "Word verification response is incorrect, please try again."
end
return false
else
@@ -34,7 +34,7 @@ def verify_recaptcha(options = {})
flash[:recaptcha_error] = "recaptcha-not-reachable"
if model
model.valid?
- model.errors.add :base, options[:message] || "Oops, we failed to validate your Captcha. Please try again."
+ model.errors.add :base, options[:message] || "Oops, we failed to validate your word verification response. Please try again."
end
return false
rescue Exception => e

0 comments on commit 3615b3d

Please sign in to comment.