Skip to content

Instantly share code, notes, and snippets.

@c3mediagroup
Created June 23, 2009 18:23
Show Gist options
  • Save c3mediagroup/134734 to your computer and use it in GitHub Desktop.
Save c3mediagroup/134734 to your computer and use it in GitHub Desktop.
class DashboardController < ApplicationController
def index
# @charts = OrderedHash.new
# @charts['Overall Performance'] = Chart.new(current_account.categorical_years.for(@year_num)).generate(:size => '310x220')
# @charts['Fixed Products'] = Chart.new(current_account.fixed_product_years.for(@year_num)).generate(:size => '310x220')
# @top_producers_premium = PaymentEvent.year(Time.now.year).sum_total.all(:order => "total DESC", :limit => 10, :include => :advisor)
@top_producers_premium = PaymentEvent.year(Time.now.year).sum_total.all(:order => "total DESC", :limit => 10, :include => :advisor).collect{|prem| p [prem.advisor_id, prem.total] }
end
def redirect
redirect_to dashboard_path
end
# def top_producers
#
# end
#
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment