Permalink
Browse files

Fix to content_model fields

  • Loading branch information...
1 parent 5d3d466 commit 65845258577dc6b0c04feec46d2dc167efa28085 @cykod committed Oct 19, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 app/models/market_segment.rb
@@ -162,19 +162,19 @@ def subscription_target_entries(options)
def content_model_target_count(options={})
return 0 unless self.content_model
- self.content_model.count
+ self.content_model.content_model.count
end
def content_model_target_list(options)
return [] unless self.content_model
email_field = self.options[:email_field]
- self.content_model.find(:all,options).collect { |sub| [ sub.send(email_field), sub.identifier_name ] }
+ self.content_model.content_model.find(:all,options).collect { |sub| [ sub.send(email_field), sub.identifier_name ] }
end
def content_model_target_entries(options)
return [] unless self.content_model
email_field = self.options[:email_field]
- self.content_model.find(:all,options).collect { |entry| [ entry.send(email_field), entry, entry.id ] }
+ self.content_model.content_model.find(:all,options).collect { |entry| [ entry.send(email_field), entry, entry.id ] }
end
def user_segment_target_count(options={})

0 comments on commit 6584525

Please sign in to comment.