jsamos

Results 3 comments of jsamos

You can also write a custom parser that resolves the model from the "type" ``` ruby def handle_data(result_set, data) ... record_class = choose_model_for(result_set, res) ... end def choose_model_for(result_set, res) res_type_name...

i know the raw body is copied here https://github.com/chingor13/json_api_client/blob/105e9d079c92c4b540d0dc2752eb01317ac4f9b0/lib/json_api_client/middleware/parse_json.rb and there is an attr_reader :faraday on the connection https://github.com/chingor13/json_api_client/blob/105e9d079c92c4b540d0dc2752eb01317ac4f9b0/lib/json_api_client/connection.rb#L4 not sure if that would allow u access somehow

A custom one that works with hashes would look like. The size alias is so that it works with active model serializers ``` ruby class MyPaginator < JsonApiClient::Paginating::Paginator alias_method :size,...