Skip to content

Instantly share code, notes, and snippets.

@sprite2005
Created May 3, 2009 20:50
Show Gist options
  • Save sprite2005/106157 to your computer and use it in GitHub Desktop.
Save sprite2005/106157 to your computer and use it in GitHub Desktop.
@placed_calls = current_user.call_logs.find(:all, :conditions => ['client_id = ?', current_user.id])
@placed_calls_vendor_count = Hash.new(0)
@placed_calls.each { |e| @placed_calls_vendor_count[e.vendor] += 1}
@placed_calls_vendor_count.sort {|a, b| a <=> b}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment