Skip to content

Commit

Permalink
Merge 682fa5c into 60dae3f
Browse files Browse the repository at this point in the history
  • Loading branch information
moumar committed Aug 5, 2013
2 parents 60dae3f + 682fa5c commit 7474727
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions lib/pg_search/multisearch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ module Multisearch

class << self
def rebuild(model, clean_up=true)
model.transaction do
PgSearch::Document.where(:searchable_type => model.name).delete_all if clean_up
Rebuilder.new(model).rebuild
end
PgSearch::Document.where(:searchable_type => model.name).delete_all if clean_up
Rebuilder.new(model).rebuild
end
end

Expand Down
2 changes: 1 addition & 1 deletion lib/pg_search/tasks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
original_schema_search_path = connection.schema_search_path
begin
connection.schema_search_path = args.schema if args.schema
PgSearch::Multisearch.rebuild(model_class)
PgSearch::Multisearch.rebuild(model_class, true)
ensure
connection.schema_search_path = original_schema_search_path
end
Expand Down

0 comments on commit 7474727

Please sign in to comment.