From 6fe11d8bd18833d55873d70119cc017f053ee744 Mon Sep 17 00:00:00 2001 From: introkun Date: Tue, 2 Jun 2009 10:09:50 -0700 Subject: [PATCH] fixed adding error message --- lib/recaptcha.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/recaptcha.rb b/lib/recaptcha.rb index edde72e6..dc36e08a 100644 --- a/lib/recaptcha.rb +++ b/lib/recaptcha.rb @@ -69,7 +69,7 @@ def verify_recaptcha(options = {}) if Rails::VERSION::MAJOR == 2 and Rails::VERSION::MINOR >= 2 model.errors.add_to_base I18n.translate("#{model.class.name.underscore}.captcha", :scope => %w(activerecord errors models), :default => options[:message] ||= "Captcha response is incorrect, please try again.") else - model.errors.add_to_base options[:message] ||= "Captcha response is incorrect, please try again." + model.errors.add_to_base options[:message] || "Captcha response is incorrect, please try again." end end return false