From f775ad62d9b84633228df65259b72b3df89e0de7 Mon Sep 17 00:00:00 2001 From: Jeremy Friesen Date: Mon, 1 Apr 2024 13:40:26 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Address=20`ActionView::Template:?= =?UTF-8?q?:Error`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I'm seeing the following in Sentry: ``` ArgumentError wrong number of arguments (given 1, expected 2) ``` With this commit, we factor towards the correct arity while also allowing additional parameters. --- app/helpers/blacklight/blacklight_helper_behavior.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/blacklight/blacklight_helper_behavior.rb b/app/helpers/blacklight/blacklight_helper_behavior.rb index b1c0778e..c4f1be07 100644 --- a/app/helpers/blacklight/blacklight_helper_behavior.rb +++ b/app/helpers/blacklight/blacklight_helper_behavior.rb @@ -331,7 +331,7 @@ def document_index_view_type(query_params = params) # # @param [String] format suffix # @yield - def with_format(format, _block) + def with_format(format, *, &block) old_formats = formats self.formats = [format] yield