FIX: when CDN assets are not in root path source maps fail

This commit is contained in:
Sam
2016-02-05 13:05:47 +11:00
parent 0ef141b2c3
commit 886273f158
3 changed files with 41 additions and 2 deletions

View File

@@ -6,4 +6,13 @@ module GlobalPath
def cdn_path(p)
"#{GlobalSetting.cdn_url}#{path(p)}"
end
def cdn_relative_path(path)
if (cdn_url = GlobalSetting.cdn_url).present?
URI.parse(cdn_url).path + path
else
path
end
end
end