Split enterprise_relationships rabl into show and index

This commit is contained in:
Rohan Mitchell
2014-05-15 16:20:25 +10:00
parent ba7e29074f
commit 3cb55062cc
2 changed files with 12 additions and 10 deletions

View 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

View File

@@ -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"