Explorar o código

Use URI.join for generate asset URL (#2741)

* Use URI.join for generate asset URL

* to String
Yamagishi Kazutoshi %!s(int64=7) %!d(string=hai) anos
pai
achega
2ab7dc9a55
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      app/helpers/routing_helper.rb

+ 1 - 1
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