Files
openfoodnetwork/app/serializers/api/property_serializer.rb
Luis Ramos e52937c113 Use rubocop auto correct to add frozen string literal to all files
This is an unsafe auto corection, we will need to trust our build here
2021-06-17 23:07:26 +01:00

12 lines
301 B
Ruby

# frozen_string_literal: true
class Api::PropertySerializer < ActiveModel::Serializer
attributes :id, :name, :presentation
# Client-side we don't care about the property name. Send the presentation
# since this is what we want to show to the user.
def name
object.presentation
end
end