Files
openfoodnetwork/app/models/invoice/data_presenter/variant.rb
Mohamed ABDELLANI 61d58df56f fix linter issues
2023-06-18 21:03:13 +02:00

17 lines
337 B
Ruby

# frozen_string_literal: false
class Invoice
class DataPresenter
class Variant < Invoice::DataPresenter::Base
attributes :id, :display_name, :options_text
attributes_with_presenter :product
def name_to_display
return product.name if display_name.blank?
display_name
end
end
end
end