X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/ef7f3d800cbdd49b692df10d312e5fd880e2e938..6b44a1976cf07ba50ba8aed8b34434e69a45e62d:/config/initializers/paperclip.rb?ds=sidebyside diff --git a/config/initializers/paperclip.rb b/config/initializers/paperclip.rb index 75f6d2371..4db3166ae 100644 --- a/config/initializers/paperclip.rb +++ b/config/initializers/paperclip.rb @@ -5,8 +5,8 @@ module Paperclip def for(style_name, options) url = super(style_name, options) - if url =~ /^\/assets\/(.*)$/ - asset_path($1) + if url =~ %r{^/assets/(.*)$} + asset_path(Regexp.last_match(1)) else url end