FIX: CDN wasn't properly applied to category background images when using S3

This commit is contained in:
Régis Hanol
2017-05-22 18:37:01 +02:00
parent decb432740
commit a7f337fa93
3 changed files with 36 additions and 5 deletions

View File

@@ -132,12 +132,8 @@ COMMENT
@theme == :nil ? nil : @theme
end
def apply_cdn(url)
"#{GlobalSetting.cdn_url}#{url}"
end
def category_css(category)
"body.category-#{category.full_slug} { background-image: url(#{apply_cdn(category.uploaded_background.url)}) }\n"
"body.category-#{category.full_slug} { background-image: url(#{upload_cdn_path(category.uploaded_background.url)}) }\n"
end
def imports(asset, parent_path)