I am building a Rails API and am using Netflix's fast_jsonapi
code to serialize my ActiveRecord
objects:
class PerformancesController < ApplicationController
def index
render json: serialize(user.performances)
end
def serialize(data)
PerformanceSerializer.new(data).serialized_json
end
end
However, when the response returns, I have to access the data with response.data.data
:
This just seems awkward to me. Is there anyway to remove one of the data's?