mirror of
https://github.com/usetrmnl/terminus.git
synced 2026-08-13 14:29:27 -07:00
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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user