Skip to content

Commit

Permalink
Made sure that empty e-mail fields are not shown when sending newslet…
Browse files Browse the repository at this point in the history
…ters. (An empty e-mail field comes when a user has had an e-mail adress but it was removed, thus it is not NULL but an empty string. Maybe this should be changed?)
  • Loading branch information
ronnqvist committed Apr 8, 2009
1 parent 7739e51 commit 3015b00
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/email.rb
Expand Up @@ -10,6 +10,6 @@ class Email < ActiveRecord::Base
validates_uniqueness_of :email

def self.for_newsletter
find(:all, :conditions => ['receive_newsletters = ?', true])
find(:all, :conditions => ['receive_newsletters = ? AND email != ?', true, ''])
end
end

0 comments on commit 3015b00

Please sign in to comment.