mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-01 02:03:22 +00:00
Provide #image_pack_path helper method
This commit is contained in:
10
config/initializers/webpack.rb
Normal file
10
config/initializers/webpack.rb
Normal file
@@ -0,0 +1,10 @@
|
||||
|
||||
module WebpackImageExtension
|
||||
def image_pack_path(image)
|
||||
# The Webpacker::Helper#resolve_path_to_image method is incredibly useful
|
||||
# for nicely fetching Webpacker image paths, but it's private.
|
||||
resolve_path_to_image(image)
|
||||
end
|
||||
end
|
||||
|
||||
Webpacker::Helper.include WebpackImageExtension
|
||||
Reference in New Issue
Block a user