diff options
Diffstat (limited to 'app/controllers/user_controller.rb')
-rw-r--r-- | app/controllers/user_controller.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb index 5809484f1..9a8b92e81 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.64 2009-03-18 02:37:42 francis Exp $ +# $Id: user_controller.rb,v 1.65 2009-04-14 14:51:00 tony Exp $ class UserController < ApplicationController # Show page about a user @@ -261,6 +261,12 @@ class UserController < ApplicationController end + # River of News: What's happening with your tracked things + def river + @results = @user.track_things.collect { |thing| + perform_search([InfoRequestEvent], thing.track_query, thing.params[:feed_sortby], nil).results + }.flatten.sort { |a,b| b[:model].created_at <=> a[:model].created_at }.first(20) + end private |