End of evening commit, changing supplier to JSONAPI

This commit is contained in:
2015-09-08 23:22:13 +02:00
parent 3cb7fd2a6f
commit 9c1945252d
36 changed files with 195 additions and 230 deletions
@@ -3,11 +3,11 @@ module Suppliers
prepend_before_action :find_page, only: [:show]
def index
@pages = Page.all_for_suppliers(locale: params[:locale])
render json: @pages, each_serializer: Suppliers::PageSerializer
render json: JSONAPI::Serializer.serialize(@pages, serializer: Suppliers::PageSerializer, is_collection: true)
end
def show
render json: @page, serializer: Suppliers::PageSerializer
render json: JSONAPI::Serializer.serialize(@page, serializer: Suppliers::PageSerializer)
end
private