switch to JSONAPI for suppliers

This commit is contained in:
2015-09-09 09:12:30 +02:00
parent 9c1945252d
commit 5cdbe57dec
10 changed files with 58 additions and 11 deletions
@@ -2,7 +2,7 @@ module Employees
class SuppliersController < Employees::ApplicationController
def index
@suppliers = current_employee.suppliers
render json: @suppliers, each_serializer: Employees::SupplierSerializer
render json: JSONAPI::Serializer.serialize(@suppliers, serializer: Employees::SupplierSerializer, is_collection: true)
end
end
end