move map icons to public/
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |