aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/info_request.rb
diff options
context:
space:
mode:
authorSeb Bacon <seb.bacon@gmail.com>2011-08-24 11:50:10 +0100
committerSeb Bacon <seb.bacon@gmail.com>2011-08-29 09:44:32 +0100
commit284808d259b3ba8ba1e6c106d949fffeb110a5a7 (patch)
treee71adef34ba97cec8c0fa53232f37e6d0eebb30c /app/models/info_request.rb
parent50cd41b88b4421824e436d9189f8780b84c46a1a (diff)
First stab at filtering on the "View requests" page
Diffstat (limited to 'app/models/info_request.rb')
-rw-r--r--app/models/info_request.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/info_request.rb b/app/models/info_request.rb
index c667e1499..9b0f1047b 100644
--- a/app/models/info_request.rb
+++ b/app/models/info_request.rb
@@ -451,7 +451,7 @@ public
self.log_event("response", params)
self.save!
end
-
+ self.info_request_events.each { |event| event.xapian_mark_needs_index } # for the "waiting_classification" index
RequestMailer.deliver_new_response(self, incoming_message)
end
@@ -564,6 +564,7 @@ public
def calculate_event_states
curr_state = nil
for event in self.info_request_events.reverse
+ event.xapian_mark_needs_index # we need to reindex all events in order to update their latest_* terms
if curr_state.nil?
if !event.described_state.nil?
curr_state = event.described_state