lib/pg_search/multisearch.rb in pg_search-2.1.3 vs lib/pg_search/multisearch.rb in pg_search-2.1.4
- old
+ new
@@ -1,11 +1,13 @@
+# frozen_string_literal: true
+
require "pg_search/multisearch/rebuilder"
module PgSearch
module Multisearch
class << self
- def rebuild(model, clean_up=true)
+ def rebuild(model, clean_up = true)
model.transaction do
PgSearch::Document.where(:searchable_type => model.base_class.name).delete_all if clean_up
Rebuilder.new(model).rebuild
end
end
@@ -20,7 +22,5 @@
"#{@model_class.name} is not multisearchable. See PgSearch::ClassMethods#multisearchable"
end
end
end
end
-
-