Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

Update url_generator.rb #2676

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Update url_generator.rb #2676

wants to merge 2 commits into from

Conversation

iqre8
Copy link

@iqre8 iqre8 commented Mar 14, 2021

undefined method `escape' for URI:Module with Ruby 3.0.0
This method is obsolete and should not be used. Instead, use
CGI.escape, URI.encode_www_form or URI.encode_www_form_component
depending on your specific use case.

undefined method `escape' for URI:Module with Ruby 3.0.0
This method is obsolete and should not be used. Instead, use
CGI.escape, URI.encode_www_form or URI.encode_www_form_component
depending on your specific use case.
@sasharevzin
Copy link

Looks good to me. Would you submit it to https://github.com/kreeti/kt-paperclip

Layout/SpaceBeforeBlockBraces: Space missing to the left of {.
Layout/SpaceInsideBlockBraces: Space between { and | missing.
Metrics/LineLength: Line is too long. [95/80]
lib/paperclip/url_generator.rb Show resolved Hide resolved
@@ -65,7 +65,9 @@ def escape_url(url)
if url.respond_to?(:escape)
url.escape
else
URI.escape(url).gsub(escape_regex){|m| "%#{m.ord.to_s(16).upcase}" }
URI.encode_www_form_component(url).gsub(escape_regex) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/BlockDelimiters: Avoid using {...} for multi-line blocks.
Layout/TrailingWhitespace: Trailing whitespace detected.

@asecondwill
Copy link

is kt-paperclip a direct replacement? is paperclip completely unsupported now?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants