aboutsummaryrefslogtreecommitdiffstats
path: root/app/mailers/track_mailer.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/mailers/track_mailer.rb')
-rw-r--r--app/mailers/track_mailer.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/mailers/track_mailer.rb b/app/mailers/track_mailer.rb
index ea5489726..1bd8a7e23 100644
--- a/app/mailers/track_mailer.rb
+++ b/app/mailers/track_mailer.rb
@@ -2,7 +2,7 @@
# Emails which go to users who are tracking things.
#
# Copyright (c) 2008 UK Citizens Online Democracy. All rights reserved.
-# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
+# Email: hello@mysociety.org; WWW: http://www.mysociety.org/
class TrackMailer < ApplicationMailer
def event_digest(user, email_about_things)
@@ -67,7 +67,11 @@ class TrackMailer < ApplicationMailer
# Query for things in this track. We use described_at for the
# ordering, so we catch anything new (before described), or
# anything whose new status has been described.
- xapian_object = InfoRequest.full_search([InfoRequestEvent], track_thing.track_query, 'described_at', true, nil, 100, 1)
+ xapian_object = ActsAsXapian::Search.new([InfoRequestEvent], track_thing.track_query,
+ :sort_by_prefix => 'described_at',
+ :sort_by_ascending => true,
+ :collapse_by_prefix => nil,
+ :limit => 100)
# Go through looking for unalerted things
alert_results = []
for result in xapian_object.results