aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/info_request.rb
diff options
context:
space:
mode:
authorFrancis Irving <francis@mysociety.org>2010-10-09 14:06:45 +0100
committerFrancis Irving <francis@mysociety.org>2010-10-09 14:06:45 +0100
commit269025f66214fae18dda1d0e31f423dbe3ab6583 (patch)
tree604445ac2403a66df6b27fa7b267157a605d3536 /app/models/info_request.rb
parent9f7f967ebe1e11a0f712e035fbbc3a77a005e0f8 (diff)
Index tags on info requests.
Diffstat (limited to 'app/models/info_request.rb')
-rw-r--r--app/models/info_request.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/models/info_request.rb b/app/models/info_request.rb
index 3f5224907..7ba370838 100644
--- a/app/models/info_request.rb
+++ b/app/models/info_request.rb
@@ -146,6 +146,13 @@ class InfoRequest < ActiveRecord::Base
info_request_event.xapian_mark_needs_index
end
end
+ # Force reindex when tag string changes
+ alias_method :orig_tag_string=, :tag_string=
+ def tag_string=(tag_string)
+ ret = self.orig_tag_string=(tag_string)
+ reindex_request_events
+ return ret
+ end
# Removes anything cached about the object in the database, and saves
def clear_in_database_caches!