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

@@ -10,7 +10,7 @@ module Admin
@enterprise_relationship = EnterpriseRelationship.new params[:enterprise_relationship]
if @enterprise_relationship.save
render partial: "admin/json/enterprise_relationship", locals: {enterprise_relationship: @enterprise_relationship}
render text: Api::Admin::EnterpriseRelationshipSerializer.new(@enterprise_relationship).to_json
else
render status: 400, json: {errors: @enterprise_relationship.errors.full_messages.join(', ')}
end