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

Version Path
refinerycms-0.9.5.29 vendor/plugins/dashboard/app/controllers/admin/dashboard_controller.rb
refinerycms-0.9.5.28 vendor/plugins/dashboard/app/controllers/admin/dashboard_controller.rb
refinerycms-0.9.5.27 vendor/plugins/dashboard/app/controllers/admin/dashboard_controller.rb
refinerycms-0.9.5.26 vendor/plugins/dashboard/app/controllers/admin/dashboard_controller.rb
refinerycms-0.9.5.25 vendor/plugins/dashboard/app/controllers/admin/dashboard_controller.rb
refinerycms-0.9.5.24 vendor/plugins/dashboard/app/controllers/admin/dashboard_controller.rb
refinerycms-0.9.5.23 vendor/plugins/dashboard/app/controllers/admin/dashboard_controller.rb
refinerycms-0.9.5.22 vendor/plugins/dashboard/app/controllers/admin/dashboard_controller.rb
refinerycms-0.9.5.21 vendor/plugins/dashboard/app/controllers/admin/dashboard_controller.rb
refinerycms-0.9.5.20 vendor/plugins/dashboard/app/controllers/admin/dashboard_controller.rb
refinerycms-0.9.5.19 vendor/plugins/dashboard/app/controllers/admin/dashboard_controller.rb
refinerycms-0.9.5.18 vendor/plugins/dashboard/app/controllers/admin/dashboard_controller.rb
refinerycms-0.9.5.17 vendor/plugins/dashboard/app/controllers/admin/dashboard_controller.rb
refinerycms-0.9.5.16 vendor/plugins/dashboard/app/controllers/admin/dashboard_controller.rb
refinerycms-0.9.5.15 vendor/plugins/dashboard/app/controllers/admin/dashboard_controller.rb
refinerycms-0.9.5.14 vendor/plugins/dashboard/app/controllers/admin/dashboard_controller.rb