Sha256: 6e1ac44a6038d1f07422241b54ba1f61c531d0f7902229a436481e20c0328268
Contents?: true
Size: 1.24 KB
Versions: 7
Compression:
Stored size: 1.24 KB
Contents
module Admin class DashboardController < Admin::BaseController def index @recent_activity = [] Refinery::Plugins.active.each do |plugin| begin plugin.activity.each do |activity| @recent_activity << activity.class.where(activity.conditions). order(activity.order). limit(activity.limit). all end rescue logger.warn "#{$!.class.name} raised while getting recent activity for dashboard." logger.warn $!.message logger.warn $!.backtrace.collect { |b| " > #{b}" }.join("\n") end end @recent_activity = @recent_activity.flatten.compact.sort { |x,y| y.updated_at <=> x.updated_at }.first(activity_show_limit=RefinerySetting.find_or_set(:activity_show_limit, 7)) @recent_inquiries = defined?(Inquiry) ? Inquiry.latest(activity_show_limit) : [] end def disable_upgrade_message RefinerySetting.update_all({ :value => false }, { :name => 'show_internet_explorer_upgrade_message', :scoping => 'refinery' }) render :nothing => true end end end
Version data entries
7 entries across 7 versions & 2 rubygems