mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-06 22:36:07 +00:00
Split enterprise_relationships rabl into show and index
This commit is contained in:
11
app/views/admin/json/_enterprise_relationship.rabl
Normal file
11
app/views/admin/json/_enterprise_relationship.rabl
Normal file
@@ -0,0 +1,11 @@
|
||||
object @enterprise_relationship
|
||||
|
||||
attributes :parent_id, :child_id
|
||||
|
||||
node :parent_name do |enterprise_relationship|
|
||||
enterprise_relationship.parent.name
|
||||
end
|
||||
|
||||
node :child_name do |enterprise_relationship|
|
||||
enterprise_relationship.child.name
|
||||
end
|
||||
@@ -1,11 +1,2 @@
|
||||
collection @enterprise_relationships
|
||||
|
||||
attributes :parent_id, :child_id
|
||||
|
||||
node :parent_name do |enterprise_relationship|
|
||||
enterprise_relationship.parent.name
|
||||
end
|
||||
|
||||
node :child_name do |enterprise_relationship|
|
||||
enterprise_relationship.child.name
|
||||
end
|
||||
extends "admin/json/enterprise_relationship"
|
||||
|
||||
Reference in New Issue
Block a user