aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/info_request.rb
diff options
context:
space:
mode:
authortony <tony>2009-04-23 09:20:50 +0000
committertony <tony>2009-04-23 09:20:50 +0000
commit990d3e25111682cb409711b4e01a9381a23cec11 (patch)
tree435cd82828bce20d8876bbd6c8f11b5663d07ccc /app/models/info_request.rb
parent530bfa90765ee86051208c14c18b0c7894eb6301 (diff)
Reindex only after update, not after initial creation
Diffstat (limited to 'app/models/info_request.rb')
-rw-r--r--app/models/info_request.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/info_request.rb b/app/models/info_request.rb
index a37baf8d8..513198241 100644
--- a/app/models/info_request.rb
+++ b/app/models/info_request.rb
@@ -23,7 +23,7 @@
# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: info_request.rb,v 1.187 2009-04-22 01:10:33 francis Exp $
+# $Id: info_request.rb,v 1.188 2009-04-23 09:20:50 tony Exp $
require 'digest/sha1'
require File.join(File.dirname(__FILE__),'../../vendor/plugins/acts_as_xapian/lib/acts_as_xapian')
@@ -107,7 +107,7 @@ class InfoRequest < ActiveRecord::Base
# if the URL name has changed, then all request: queries
# will break unless we update index for every event
- after_save :reindex_request_events
+ after_update :reindex_request_events
def reindex_request_events
if self.changes.include?('url_title')
for info_request_event in self.info_request_events