Commit 300ce8a4a98624421261e2d45d0a30c721d0c87c
1 parent
0c1b599c
Exists in
master
and in
29 other branches
ActionItem146: fixing warning 'constant already defined'
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1622 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
1 changed file
with
3 additions
and
3 deletions
Show diff stats
vendor/plugins/inverse_captcha/lib/inverse_captcha.rb
@@ -2,9 +2,9 @@ module InverseCaptcha | @@ -2,9 +2,9 @@ module InverseCaptcha | ||
2 | 2 | ||
3 | module ClassMethods | 3 | module ClassMethods |
4 | def inverse_captcha(opt = {}) | 4 | def inverse_captcha(opt = {}) |
5 | - InverseCaptcha.const_set("ICAPTCHA_FIELD", opt[:field]) | ||
6 | - InverseCaptcha.const_set("ICAPTCHA_LABEL", opt[:label] || N_("Don't fill this field")) | ||
7 | - InverseCaptcha.const_set("ICAPTCHA_STYLECLASS", opt[:class] || 'ghost') | 5 | + InverseCaptcha.const_set("ICAPTCHA_FIELD", opt[:field]) unless InverseCaptcha.const_defined? "ICAPTCHA_FIELD" |
6 | + InverseCaptcha.const_set("ICAPTCHA_LABEL", opt[:label] || N_("Don't fill this field")) unless InverseCaptcha.const_defined? "ICAPTCHA_LABEL" | ||
7 | + InverseCaptcha.const_set("ICAPTCHA_STYLECLASS", opt[:class] || 'ghost') unless InverseCaptcha.const_defined? "ICAPTCHA_STYLECLASS" | ||
8 | self.send(:include, InverseCaptcha) | 8 | self.send(:include, InverseCaptcha) |
9 | end | 9 | end |
10 | end | 10 | end |