diff options
Diffstat (limited to 'app/mailers')
-rw-r--r-- | app/mailers/request_mailer.rb | 2 | ||||
-rw-r--r-- | app/mailers/track_mailer.rb | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/app/mailers/request_mailer.rb b/app/mailers/request_mailer.rb index 3eb89c660..4dbce6738 100644 --- a/app/mailers/request_mailer.rb +++ b/app/mailers/request_mailer.rb @@ -4,8 +4,6 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: hello@mysociety.org; WWW: http://www.mysociety.org/ -require 'alaveteli_file_types' - class RequestMailer < ApplicationMailer # Used when an FOI officer uploads a response from their web browser - this is # the "fake" email used to store in the same format in the database as if they diff --git a/app/mailers/track_mailer.rb b/app/mailers/track_mailer.rb index 391143214..1bd8a7e23 100644 --- a/app/mailers/track_mailer.rb +++ b/app/mailers/track_mailer.rb @@ -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 |