mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-25 20:46:48 +00:00
We configured Paperclip to convert images to JPG in some cases but I omitted that here because we don't need it. If an image is better represented as PNG or another format then the user should be able to choose that. Some specs were also testing the generated URL but the Active Storage URL doesn't contain a style name anymore and it's not helpful to test the URL.
20 lines
386 B
Ruby
20 lines
386 B
Ruby
# frozen_string_literal: true
|
|
|
|
module FileHelper
|
|
def black_logo_file
|
|
Rack::Test::UploadedFile.new(black_logo_path)
|
|
end
|
|
|
|
def white_logo_file
|
|
Rack::Test::UploadedFile.new(white_logo_path)
|
|
end
|
|
|
|
def black_logo_path
|
|
Rails.root.join('app/webpacker/images/logo-black.png')
|
|
end
|
|
|
|
def white_logo_path
|
|
Rails.root.join('app/webpacker/images/logo-white.png')
|
|
end
|
|
end
|