Skip to content

Commit

Permalink
Fix, had to remove null sources.
Browse files Browse the repository at this point in the history
  • Loading branch information
Doug Youch committed May 28, 2010
1 parent b9afe22 commit 7c0dc30
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/models/end_user_segment_type.rb
Expand Up @@ -15,7 +15,7 @@ def self.is(cls, field, gender)

class SourceType < UserSegment::FieldType
def self.select_options
EndUser.find(:all, :select => 'DISTINCT source').collect(&:source).sort
EndUser.find(:all, :select => 'DISTINCT source').collect(&:source).reject { |source| source.blank? }.sort.collect { |source| [source, source] }
end

register_operation :is, [['Source', :model, {:class => EndUserSegmentType::SourceType}]]
Expand All @@ -27,7 +27,7 @@ def self.is(cls, field, source)

class LeadSourceType < UserSegment::FieldType
def self.select_options
EndUser.find(:all, :select => 'DISTINCT lead_source').collect(&:lead_source).sort
EndUser.find(:all, :select => 'DISTINCT lead_source').collect(&:lead_source).reject { |lead_source| lead_source.blank? }.sort.collect { |source| [source, source] }
end

register_operation :is, [['Lead Source', :model, {:class => EndUserSegmentType::LeadSourceType}]]
Expand Down

0 comments on commit 7c0dc30

Please sign in to comment.