move map icons to public/

This commit is contained in:
Andy Brett
2021-02-16 15:56:32 -08:00
parent f8239ed3ed
commit e7489965c5
12 changed files with 2 additions and 12 deletions

View File

@@ -129,7 +129,7 @@ module Api
producer_shop: "map_003-producer-shop.svg",
producer: "map_001-producer-only.svg",
}
ImagePathGenerator.call(icons[enterprise.category])
"map_icons/" + icons[enterprise.category]
end
# Choose regular icon font for enterprises.

View File

@@ -19,7 +19,7 @@ module Api
producer_shop: "map_003-producer-shop.svg",
producer: "map_001-producer-only.svg",
}
ImagePathGenerator.call(icons[enterprise.category])
"map_icons/" + icons[enterprise.category]
end
def icon_font

View File

@@ -1,10 +0,0 @@
# frozen_string_literal: true
class ImagePathGenerator
# Since Rails 4 has adjusted the way assets paths are handled, we have to access certain
# asset-based helpers like this when outside of a view or controller context.
# See: https://stackoverflow.com/a/16609815
def self.call(path)
ActionController::Base.helpers.image_path(path)
end
end

View File

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

View File

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

View File

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

View File

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

View File

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

View File

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB