From 3f1ddfe615bce2cb1b0856c69a3e3c9fc966311a Mon Sep 17 00:00:00 2001 From: francis Date: Tue, 2 Sep 2008 23:50:27 +0000 Subject: Group tracks on user page. --- app/controllers/user_controller.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'app/controllers/user_controller.rb') diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb index c6eaeea68..c4a9c49e1 100644 --- a/app/controllers/user_controller.rb +++ b/app/controllers/user_controller.rb @@ -4,7 +4,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: user_controller.rb,v 1.54 2008-08-21 01:26:11 francis Exp $ +# $Id: user_controller.rb,v 1.55 2008-09-02 23:50:27 francis Exp $ class UserController < ApplicationController # Show page about a user @@ -25,6 +25,10 @@ class UserController < ApplicationController # Track corresponding to this page @track_thing = TrackThing.create_track_for_user(@display_user) @feed_autodetect = [ { :url => do_track_url(@track_thing, 'feed'), :title => @track_thing.params[:title_in_rss] } ] + + # All tracks for the user + @track_things = TrackThing.find(:all, :conditions => ["tracking_user_id = ? and track_medium = ?", @display_user.id, 'email_daily'], :order => 'created_at desc') + @track_things_grouped = @track_things.group_by(&:track_type_description) end # Login form -- cgit v1.2.3