From edb87733fd45c8dbee1a552f3da207f5d1e1252a Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Tue, 14 Feb 2023 12:06:47 -0800 Subject: [PATCH] support paperclip with a sad monkeypatch --- config/initializers/monkeypatch.rb | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 config/initializers/monkeypatch.rb diff --git a/config/initializers/monkeypatch.rb b/config/initializers/monkeypatch.rb new file mode 100644 index 00000000..7eeef76c --- /dev/null +++ b/config/initializers/monkeypatch.rb @@ -0,0 +1,9 @@ +# We need to monkeypatch this in because paperclip internally uses URI.escape, and +# Rails 3 drops URI.escape support in favor of CGI.escape. After we've migrated off +# paperclip (or paperclip stops sucking), we can remove this monkeypatch. + +module URI + def URI.escape(url) + CGI.escape(url) + end +end \ No newline at end of file