diff options
-rw-r--r-- | app/models/user.rb | 17 | ||||
-rw-r--r-- | todo.txt | 1 |
2 files changed, 17 insertions, 1 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index 4b8404dd3..472929144 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -22,7 +22,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: user.rb,v 1.76 2008-12-02 12:41:33 francis Exp $ +# $Id: user.rb,v 1.77 2008-12-04 15:03:42 francis Exp $ require 'digest/sha1' @@ -70,6 +70,21 @@ class User < ActiveRecord::Base end end + # requested_by: and commented_by: search queries also need updating after save + after_save :reindex_referencing_models + def reindex_referencing_models + for comment in self.comments + for info_request_event in comment.info_request_events + info_request_event.xapian_mark_needs_index + end + end + for info_request in self.info_requests + for info_request_event in info_request.info_request_events + info_request_event.xapian_mark_needs_index + end + end + end + def visible_comments self.comments.find(:all, :conditions => 'visible') end @@ -75,6 +75,7 @@ When doing search, people often just want it to show the whole page. Perhaps all listing should just link to top of page, rather than # links for outgoing incoming, or perhaps just some of them. +Add "A request got stuck in my spam filters" to tell authorities to whitelist us Add "I have a large file" to FOI office FAQ Add "Who should I make my request to?" Add "I want to file squillions of requests" |