Files
openfoodnetwork/app/serializers/api/property_serializer.rb
2016-11-25 14:14:42 +11:00

10 lines
270 B
Ruby

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