From 588839cf8bca2882765c5b24bac4668e5a83f04f Mon Sep 17 00:00:00 2001 From: Justin Coyne Date: Mon, 19 Aug 2024 13:59:48 -0500 Subject: [PATCH] Using DeprecatedConstantProxy without a Deprecator is deprecated See https://github.com/rails/rails/commit/fc2dc7c8d3449e0d38cccab2e69647d8e1fb9b60 --- app/controllers/concerns/blacklight/marc/catalog.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/controllers/concerns/blacklight/marc/catalog.rb b/app/controllers/concerns/blacklight/marc/catalog.rb index 952ebd6..3d0af4b 100644 --- a/app/controllers/concerns/blacklight/marc/catalog.rb +++ b/app/controllers/concerns/blacklight/marc/catalog.rb @@ -9,13 +9,14 @@ module Catalog end def librarian_view + deprecator = ActiveSupport::Deprecation.new if Blacklight::VERSION >= '8' @document = search_service.fetch(params[:id]) - @response = ActiveSupport::Deprecation::DeprecatedObjectProxy.new(@document.response, "The @response instance variable is deprecated and will be removed in Blacklight-marc 8.0") + @response = ActiveSupport::Deprecation::DeprecatedObjectProxy.new(@document.response, "The @response instance variable is deprecated and will be removed in Blacklight-marc 8.0", deprecator) else deprecated_response, @document = search_service.fetch(params[:id]) - @response = ActiveSupport::Deprecation::DeprecatedObjectProxy.new(deprecated_response, "The @response instance variable is deprecated and will be removed in Blacklight-marc 8.0") + @response = ActiveSupport::Deprecation::DeprecatedObjectProxy.new(deprecated_response, "The @response instance variable is deprecated and will be removed in Blacklight-marc 8.0", deprecator) end respond_to do |format|