mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-15 23:57:48 +00:00
21 lines
312 B
Ruby
21 lines
312 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Api
|
|
class TaxonJstreeSerializer < ActiveModel::Serializer
|
|
attributes :data, :state
|
|
has_one :attr, serializer: TaxonJstreeAttributeSerializer
|
|
|
|
def data
|
|
object.name
|
|
end
|
|
|
|
def attr
|
|
object
|
|
end
|
|
|
|
def state
|
|
"closed"
|
|
end
|
|
end
|
|
end
|