mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-22 00:57:26 +00:00
20 lines
374 B
Ruby
20 lines
374 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Spree
|
|
module Admin
|
|
module ImagesHelper
|
|
def options_text_for(image)
|
|
if image.viewable.is_a?(Spree::Variant)
|
|
if image.viewable.is_master?
|
|
I18n.t(:all)
|
|
else
|
|
image.viewable.options_text
|
|
end
|
|
else
|
|
I18n.t(:all)
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|