FIX - rails_route_from_url would fail if path contained unicode characters

This commit is contained in:
jbrw 2020-08-28 15:10:10 -04:00
parent 84dba3c1c7
commit e1896f7e71
No known key found for this signature in database
GPG Key ID: AF11336DC5C6EC71

View File

@ -68,7 +68,7 @@ class UrlHelper
end end
def self.rails_route_from_url(url) def self.rails_route_from_url(url)
path = URI.parse(url).path path = URI.parse(encode(url)).path
Rails.application.routes.recognize_path(path) Rails.application.routes.recognize_path(path)
end end