mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-25 20:46:48 +00:00
14 lines
236 B
Ruby
14 lines
236 B
Ruby
class VariantPresenter
|
|
attr_accessor :variant
|
|
|
|
def initialize(variant)
|
|
@variant = variant
|
|
end
|
|
|
|
delegate :id, to: :variant
|
|
|
|
def image_url
|
|
@variant.images.first.attachment.url :mini if @variant.images.present?
|
|
end
|
|
end
|