Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

Commit

Permalink
Use URI.join for generate asset URL (mastodon#2741)
Browse files Browse the repository at this point in the history
* Use URI.join for generate asset URL

* to String
  • Loading branch information
ykzts authored and Gargron committed May 3, 2017
1 parent 2b9bc9c commit 2ab7dc9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/helpers/routing_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ def default_url_options
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

0 comments on commit 2ab7dc9

Please sign in to comment.