Skip to content

Add some features from v0.3.5

Choose a tag to compare

@tiagopog tiagopog released this 10 Apr 05:28
· 283 commits to master since this release

There was a parallel development for v0.3.x because of its compatibility with jsonapi-resources at the popular versions v0.5.x . Then some features like a proper sorting and filtering, improvements for pagination, record count and other were firstly released for v0.3.5. Now v0.4.2 brings all those features for projects heading to use the latest version of jsonapi-resources.

Now supporting:

  • Filter:
    • Filter records via filter query string param;
    • Add filter opt-out: jsonapi_render collection, options: { filter: false };
    • Access filter params via: filter_params in controllers.
  • Sort:
    • Sort records via sort query string param;
    • Sorting is possible for two kind of objects: ActiveRecord_Relation and Array;
    • Access sort params via: sort_params in controllers.
  • Pagination:
    • Pagination is possible for two kind of objects: ActiveRecord_Relation and Array;
    • Add pagination opt-out: jsonapi_render collection, options: { paginate: false }.

General fixes and improvements:

  • Exception handling;
  • Pagination count;
  • Capturing the ID of a not found record.