lib/pg_search/tasks.rb in pg_search-2.3.0 vs lib/pg_search/tasks.rb in pg_search-2.3.1
- old
+ new
@@ -10,9 +10,10 @@
raise ArgumentError, <<-MESSAGE.strip_heredoc unless args.model
You must pass a model as an argument.
Example: rake pg_search:multisearch:rebuild[BlogPost]
MESSAGE
+
model_class = args.model.classify.constantize
connection = PgSearch::Document.connection
original_schema_search_path = connection.schema_search_path
begin
connection.schema_search_path = args.schema if args.schema