search for: deal_group

Displaying 1 result from an estimated 1 matches for "deal_group".

Did you mean: deal_groups
2009 Mar 04
10
total per user
...nt that a user has posted. So for example: User 1: Jan $3000 Feb $4000 March $1500, etc. I can get this to work if I sum totals (aggregate of all users) but just not by user. Here is my code in the controller: def index @users = User.find :all, :order => ''name ASC'' @deal_groups = Deal.find(:all).group_by {|t| t.saledate.at_beginning_of_month} end And then the code in the View <% for user in @users %> <ul id="monthly-revs"> <strong><li><%=h Time.now.year %></li></strong> <% user.deal_groups.keys.sort.each do |mo...