Skip to content

Introduce helpers for params

Choose a tag to compare

@tiagopog tiagopog released this 04 Jul 14:55
· 195 commits to master since this release

Improvements

  • Add helper methods to easily get permitted params for the primary resource and its relationships:
  • resource_params: helper to get the permitted params from params['data']['attributes'];
  • relationship_params: helper to get ids from params['relationships'].

Fixes

  • Work with a copy of ActionController's params in JSONAPI::Utils::Request#setup_request to avoid the bug reported in #21.

More details: #23