Commit ac4035d718995ed235c1935de9a7f85e31eca431

Authored by AntonioTerceiro
1 parent 39394f37

ActionItem85: using blank? instead of nil?

git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@624 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
app/models/environment.rb
@@ -123,7 +123,7 @@ class Environment < ActiveRecord::Base @@ -123,7 +123,7 @@ class Environment < ActiveRecord::Base
123 # only one environment can be the default one 123 # only one environment can be the default one
124 validates_uniqueness_of :is_default, :if => (lambda do |environment| environment.is_default? end), :message => _('Only one Virtual Community can be the default one') 124 validates_uniqueness_of :is_default, :if => (lambda do |environment| environment.is_default? end), :message => _('Only one Virtual Community can be the default one')
125 125
126 - validates_format_of :contact_email, :with => Noosfero::Constants::EMAIL_FORMAT, :if => (lambda { |record| ! record.contact_email.nil? }) 126 + validates_format_of :contact_email, :with => Noosfero::Constants::EMAIL_FORMAT, :if => (lambda { |record| ! record.contact_email.blank? })
127 127
128 # ################################################# 128 # #################################################
129 # Business logic in general 129 # Business logic in general