mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-26 20:56:48 +00:00
20 lines
362 B
Ruby
20 lines
362 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Api
|
|
module Admin
|
|
class EnterpriseRelationshipSerializer < ActiveModel::Serializer
|
|
attributes :id, :parent_id, :parent_name, :child_id, :child_name
|
|
|
|
has_many :permissions
|
|
|
|
def parent_name
|
|
object.parent.name
|
|
end
|
|
|
|
def child_name
|
|
object.child.name
|
|
end
|
|
end
|
|
end
|
|
end
|