From 269025f66214fae18dda1d0e31f423dbe3ab6583 Mon Sep 17 00:00:00 2001 From: Francis Irving Date: Sat, 9 Oct 2010 14:06:45 +0100 Subject: Index tags on info requests. --- app/models/info_request.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'app/models/info_request.rb') 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! -- cgit v1.2.3