Render enterprise relationships JSON with AMS instead of rabl

This commit is contained in:
Rohan Mitchell
2014-08-25 13:07:31 +10:00
parent 3524e658f8
commit cb615ba994
6 changed files with 18 additions and 18 deletions

View File

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