Sha256: 00227cb357ec4f72fa0b253751dad137f53a0cca58a05ed315784d913531e241
Contents?: true
Size: 713 Bytes
Versions: 16
Compression:
Stored size: 713 Bytes
Contents
class Admin::DashboardController < Admin::BaseController def index @recent_activity = [] Refinery::Plugins.active.each do |plugin| plugin.activity.each do |activity| include_associations = [] include_associations.push(:slugs) if activity.class.methods.include? "find_one_with_friendly" # wee performance gain if slugs are used. @recent_activity += activity.class.find(:all, :order => activity.order, :limit => activity.limit, :conditions => activity.conditions, :include => include_associations) end rescue nil end @recent_activity = @recent_activity.sort{|x,y| y.updated_at <=> x.updated_at}[0..((RefinerySetting.activity_show_limit ||= 15)-1)] end end
Version data entries
16 entries across 16 versions & 1 rubygems