Update Hanami

This commit is contained in:
2023-09-18 18:17:09 +10:00
parent 642ae3fbf6
commit 004c202923
14 changed files with 5361 additions and 81 deletions

View File

@@ -6,23 +6,5 @@ module Adamantium
@options = options
super(**options)
end
def asset_from_manifest(filename)
return "/assets/#{filename}" if Hanami.env != :production
hashed_filename = asset_manifest[filename]
"/assets/dist/#{hashed_filename}"
end
def link_active? path
# TODO: waiting for Hanami View to be released
# to access current_path
false
end
private
def asset_manifest
@asset_manifest ||= JSON.parse(File.read("public/assets/asset-manifest.json"))
end
end
end