From 13f487543a146952971b1d98db1b6cc709622f75 Mon Sep 17 00:00:00 2001 From: Patrick Karjala Date: Wed, 3 Jul 2024 14:54:28 -1000 Subject: [PATCH] Replace URI.escape with URB Util.url_encode due to deprecation of URI.escape in Ruby 3.x. --- lib/growlyflash/controller_additions.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/growlyflash/controller_additions.rb b/lib/growlyflash/controller_additions.rb index fd176ac..50b0f58 100644 --- a/lib/growlyflash/controller_additions.rb +++ b/lib/growlyflash/controller_additions.rb @@ -27,7 +27,7 @@ def skip_growlyflash(*args) # it again after refreshing a page def flash_to_headers if request.xhr? && growlyhash(true).size > 0 - response.headers['X-Message'] = URI.escape(growlyhash.to_json) + response.headers['X-Message'] = ERB::Util.url_encode(growlyhash.to_json) growlyhash.each_key { |k| flash.discard(k) } end end