Sha256: 75a2088a136b9e28452e7091ba405c3045b051d1820a3f7690ab3dfccca8d2e3

Contents?: true

Size: 712 Bytes

Versions: 28

Compression:

Stored size: 712 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

28 entries across 28 versions & 1 rubygems

Version Path
refinerycms-0.9.5.13 vendor/plugins/dashboard/app/controllers/admin/dashboard_controller.rb
refinerycms-0.9.5.12 vendor/plugins/dashboard/app/controllers/admin/dashboard_controller.rb
refinerycms-0.9.5.11 vendor/plugins/dashboard/app/controllers/admin/dashboard_controller.rb
refinerycms-0.9.5.10 vendor/plugins/dashboard/app/controllers/admin/dashboard_controller.rb
refinerycms-0.9.5.9 vendor/plugins/dashboard/app/controllers/admin/dashboard_controller.rb
refinerycms-0.9.5.8 vendor/plugins/dashboard/app/controllers/admin/dashboard_controller.rb
refinerycms-0.9.5.7 vendor/plugins/dashboard/app/controllers/admin/dashboard_controller.rb
refinerycms-0.9.5.6 vendor/plugins/dashboard/app/controllers/admin/dashboard_controller.rb
refinerycms-0.9.5.5 vendor/plugins/dashboard/app/controllers/admin/dashboard_controller.rb
refinerycms-0.9.5.4 vendor/plugins/dashboard/app/controllers/admin/dashboard_controller.rb
refinerycms-0.9.5.3 vendor/plugins/dashboard/app/controllers/admin/dashboard_controller.rb
refinerycms-0.9.5.2 vendor/plugins/dashboard/app/controllers/admin/dashboard_controller.rb
refinerycms-0.9.5.1 vendor/plugins/dashboard/app/controllers/admin/dashboard_controller.rb
refinerycms-0.9.5 vendor/plugins/dashboard/app/controllers/admin/dashboard_controller.rb
refinerycms-0.9.4.5 vendor/plugins/dashboard/app/controllers/admin/dashboard_controller.rb
refinerycms-0.9.4.4 vendor/plugins/dashboard/app/controllers/admin/dashboard_controller.rb
refinerycms-0.9.4.3 vendor/plugins/dashboard/app/controllers/admin/dashboard_controller.rb
refinerycms-0.9.4.2 vendor/plugins/dashboard/app/controllers/admin/dashboard_controller.rb
refinerycms-0.9.4.1 vendor/plugins/dashboard/app/controllers/admin/dashboard_controller.rb
refinerycms-0.9.4 vendor/plugins/dashboard/app/controllers/admin/dashboard_controller.rb