]> cat aescling's git repositories - mastodon.git/commitdiff
Use URI.join for generate asset URL (#2741)
authorYamagishi Kazutoshi <ykzts@desire.sh>
Wed, 3 May 2017 09:31:21 +0000 (18:31 +0900)
committerEugen Rochko <eugen@zeonfederated.com>
Wed, 3 May 2017 09:31:21 +0000 (11:31 +0200)
* Use URI.join for generate asset URL

* to String

app/helpers/routing_helper.rb

index 9ae29ec9168ff71206deb497bc1b9998faadf0ed..9650ee28678dd8bfed62e9dc6ba4ff8ef4cd6a56 100644 (file)
@@ -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