Skip to content

Commit

Permalink
Added support to display Content model fields on user segment page.
Browse files Browse the repository at this point in the history
  • Loading branch information
Doug Youch committed Aug 4, 2010
1 parent 9d4d7e6 commit 5ac4a7c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions app/models/content_model_segment_field.rb
Expand Up @@ -78,4 +78,16 @@ def self.create_custom_field_handler_class(content_model_field)

cls
end

def self.field_heading(field)
self.content_model.name + ' - ' + self.user_segment_fields[field][:name]
end

def self.get_handler_data(ids, fields)
self.content_model.content_model.find(:all, :conditions => {self.end_user_field => ids}).group_by(&self.end_user_field)
end

def self.field_output(user, handler_data, field)
UserSegment::FieldType.field_output(user, handler_data, field)
end
end

0 comments on commit 5ac4a7c

Please sign in to comment.