Fix stale site icons.
Fix artist URLs still showing old cached site icons because the URL didn't change when the file was updated. Use `image_pack_tag` so that the filename includes the hash, so that the URL changes when the file changes.
This commit is contained in:
@@ -15,7 +15,7 @@ module IconHelper
|
||||
|
||||
def image_icon_tag(filename, class: nil, **options)
|
||||
klass = binding.local_variable_get(:class)
|
||||
tag.img(src: "/images/#{filename}", class: "icon #{klass}", **options)
|
||||
image_pack_tag("static/#{filename}", class: "icon #{klass}", **options)
|
||||
end
|
||||
|
||||
# fontawesome.com/icons/arrow-alt-up
|
||||
|
||||
@@ -14,6 +14,8 @@ import morphdom from 'morphdom';
|
||||
// should start looking for nodejs replacements
|
||||
importAll(require.context('../vendor', true, /\.js$/));
|
||||
|
||||
require.context("../../../public/images", true);
|
||||
|
||||
import jQuery from 'jquery';
|
||||
require("jquery-ui/ui/widgets/autocomplete");
|
||||
require("jquery-ui/ui/widgets/button");
|
||||
|
||||
@@ -16,7 +16,7 @@ default: &default
|
||||
|
||||
# Additional paths webpack should lookup modules
|
||||
# ['app/assets', 'engine/foo/app/assets']
|
||||
additional_paths: ["app/components"]
|
||||
additional_paths: ["app/components", "public/images"]
|
||||
|
||||
# Reload manifest.json on all requests so we reload latest compiled packs
|
||||
cache_manifest: false
|
||||
|
||||
Reference in New Issue
Block a user