From 83e7d426e16936939b7cb992efc0ed51537dc40b Mon Sep 17 00:00:00 2001 From: Justin Coyne Date: Tue, 26 Jun 2018 15:04:20 -0500 Subject: [PATCH] Avoid unnecessary instantiation of data object This makes it possible to use with Elasticsearch due to: https://github.com/elastic/elasticsearch-rails/issues/804 --- app/controllers/concerns/blacklight/catalog.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/concerns/blacklight/catalog.rb b/app/controllers/concerns/blacklight/catalog.rb index 17efd43f7d..85bb54e4d9 100644 --- a/app/controllers/concerns/blacklight/catalog.rb +++ b/app/controllers/concerns/blacklight/catalog.rb @@ -65,7 +65,7 @@ def track path = uri.query ? "#{uri.path}?#{uri.query}" : uri.path redirect_to path, status: 303 else - redirect_to blacklight_config.document_model.new(id: params[:id]), status: 303 + redirect_to({ action: :show, id: params[:id] }, status: 303) end end