From: Yamagishi Kazutoshi Date: Wed, 3 May 2017 09:31:21 +0000 (+0900) Subject: Use URI.join for generate asset URL (#2741) X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=2ab7dc9a551dee6adc17df57ccb698aa037dd4ec;p=mastodon.git Use URI.join for generate asset URL (#2741) * Use URI.join for generate asset URL * to String --- diff --git a/app/helpers/routing_helper.rb b/app/helpers/routing_helper.rb index 9ae29ec91..9650ee286 100644 --- a/app/helpers/routing_helper.rb +++ b/app/helpers/routing_helper.rb @@ -12,6 +12,6 @@ module RoutingHelper end def full_asset_url(source) - Rails.configuration.x.use_s3 ? source : File.join(root_url, ActionController::Base.helpers.asset_url(source)) + Rails.configuration.x.use_s3 ? source : URI.join(root_url, ActionController::Base.helpers.asset_url(source)).to_s end end