mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-12 03:50:22 +00:00
Render enterprise relationships JSON with AMS instead of rabl
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
class Api::Admin::EnterpriseRelationshipSerializer < ActiveModel::Serializer
|
||||
attributes :id, :parent_id, :parent_name, :child_id, :child_name
|
||||
|
||||
def parent_name
|
||||
object.parent.name
|
||||
end
|
||||
|
||||
def child_name
|
||||
object.child.name
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user