From 50dbd449205d47bea2a7e1ee20b78f38bec98dff Mon Sep 17 00:00:00 2001 From: Seiei Miyagi Date: Fri, 29 Nov 2019 02:06:06 +0900 Subject: [PATCH] Fix ruby 2.7 warning: given argument is nil; this will raise a TypeError in the next release --- app/controllers/application_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index ea579bfa8..821b68ce2 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -644,7 +644,7 @@ def parse_qvalues(value) # Returns a string that can be used as filename value in Content-Disposition header def filename_for_content_disposition(name) - %r{(MSIE|Trident|Edge)}.match?(request.env['HTTP_USER_AGENT']) ? ERB::Util.url_encode(name) : name + request.env['HTTP_USER_AGENT']&.match?(%r{(MSIE|Trident|Edge)}) ? ERB::Util.url_encode(name) : name end def api_request? -- 2.24.0