diff options
author | louise <louise> | 2009-04-14 11:04:52 +0000 |
---|---|---|
committer | louise <louise> | 2009-04-14 11:04:52 +0000 |
commit | 1b306cc7e959cf69a0f3e5a388522a240c770cd9 (patch) | |
tree | ece1fd53152c4084efb613494dcf0bbeec3af2cf /app/models/user.rb | |
parent | 57b0fc86d03fe2ecf1036d6453391c4763eba6b4 (diff) |
Allowing xapian reindexing to be skipped if a no_xapian_reindex flag is set on the model
Diffstat (limited to 'app/models/user.rb')
-rw-r--r-- | app/models/user.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index 995786596..c9df7bf5c 100644 --- a/app/models/user.rb +++ b/app/models/user.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: user.rb,v 1.90 2009-04-13 09:18:48 tony Exp $ +# $Id: user.rb,v 1.91 2009-04-14 11:04:55 louise Exp $ require 'digest/sha1' @@ -43,7 +43,7 @@ class User < ActiveRecord::Base has_many :track_things, :foreign_key => 'tracking_user_id', :order => 'created_at desc' has_many :comments, :order => 'created_at desc' - attr_accessor :password_confirmation, :no_reindex + attr_accessor :password_confirmation, :no_xapian_reindex validates_confirmation_of :password, :message =>"^Please enter the same password twice" validates_inclusion_of :admin_level, :in => [ @@ -74,7 +74,7 @@ class User < ActiveRecord::Base # requested_by: and commented_by: search queries also need updating after save after_save :reindex_referencing_models def reindex_referencing_models - return if no_reindex == true + return if no_xapian_reindex == true for comment in self.comments for info_request_event in comment.info_request_events info_request_event.xapian_mark_needs_index |