Fixed device part image URI to be relative

Accidentally was using the full URL but this needs to be relative in order to serve content on different devices (i.e. desktop, mobile, etc).

Milestone: patch
This commit is contained in:
Brooke Kuhlmann
2025-03-18 16:09:45 -06:00
parent 742c9d64a3
commit 720ccdb842
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -46,7 +46,7 @@ module Terminus
def image_uri
fetcher.call(
Pathname(settings.images_root).join("generated"),
images_uri: "https://localhost:2443/assets/images"
images_uri: "/assets/images"
)[:image_url]
end
end
+1 -1
View File
@@ -28,7 +28,7 @@ RSpec.describe Terminus::Views::Parts::Device, :db do
end
it "answers URI" do
expect(part.image_uri).to eq("https://localhost:2443/assets/images/generated/test.bmp")
expect(part.image_uri).to eq("/assets/images/generated/test.bmp")
end
end