Skip to content
This repository
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 16 lines (11 sloc) 0.352 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
PfeedItem.class_eval do

  def self.expire
    self.class.sweeper.expire_pfeed_all self
  end

  def self.sweeper
    PfeedSweeper
  end

  def self.newest_items limit = 5
    self.active.find(:all, :conditions => ["participant_type IN ('#{self.item_klasses.join "', '"}')"], :limit => limit, :order => "created_at desc").map(&:participant)
  end

end
Something went wrong with that request. Please try again.