aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSeb Bacon <seb.bacon@gmail.com>2012-05-16 09:09:25 +0100
committerSeb Bacon <seb.bacon@gmail.com>2012-05-30 13:50:38 +0100
commit1dbe19adc51bc06c8a382e971df0d321033e03a0 (patch)
tree1a86fc209ebbe83f8feb84d40e346f964db3cee9
parent2855769808850de287481a43ea4fc1d026d3d832 (diff)
Limit the number of results returned on the wall
-rw-r--r--app/controllers/user_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb
index 18fae7024..72e9f63f1 100644
--- a/app/controllers/user_controller.rb
+++ b/app/controllers/user_controller.rb
@@ -122,11 +122,11 @@ class UserController < ApplicationController
end
for track_thing in @track_things
# XXX factor out of track_mailer.rb
- xapian_object = InfoRequest.full_search([InfoRequestEvent], track_thing.track_query, 'described_at', true, nil, 100, 1)
+ xapian_object = InfoRequest.full_search([InfoRequestEvent], track_thing.track_query, 'described_at', true, nil, 20, 1)
feed_results += xapian_object.results.map {|x| x[:model]}
end
- @feed_results = Array(feed_results).sort {|x,y| y.created_at <=> x.created_at}
+ @feed_results = Array(feed_results).sort {|x,y| y.created_at <=> x.created_at}.first(20)
respond_to do |format|
format.html { @has_json = true }