From ac4035d718995ed235c1935de9a7f85e31eca431 Mon Sep 17 00:00:00 2001 From: AntonioTerceiro Date: Thu, 4 Oct 2007 22:20:49 +0000 Subject: [PATCH] ActionItem85: using blank? instead of nil? --- app/models/environment.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/environment.rb b/app/models/environment.rb index 414fe6e..4a440db 100644 --- a/app/models/environment.rb +++ b/app/models/environment.rb @@ -123,7 +123,7 @@ class Environment < ActiveRecord::Base # only one environment can be the default one validates_uniqueness_of :is_default, :if => (lambda do |environment| environment.is_default? end), :message => _('Only one Virtual Community can be the default one') - validates_format_of :contact_email, :with => Noosfero::Constants::EMAIL_FORMAT, :if => (lambda { |record| ! record.contact_email.nil? }) + validates_format_of :contact_email, :with => Noosfero::Constants::EMAIL_FORMAT, :if => (lambda { |record| ! record.contact_email.blank? }) # ################################################# # Business logic in general -- libgit2 0.21.2