fields :images aggregate :images, :id do |ids, representer| # This is imaginary code!! <3 RemoteApiClient.find_images(ids).group_by(&:message_id) end def images(message) self.aggregated_images[message['id']] end end Monday, April 23, 12
belongs_to :user has_many :attachments end class SimpleMessageRepresenter < Representer::Base namespace :post attributes :id, :title, :body end Monday, April 23, 12