Thread-safe custom headers for Rails users
Pre-release
Pre-release
The changes are not expected to impact users of v1.x, but since it's technically changing the API v2.x is appropriate.
Enhancements
- Allow
message
to be passed in when raising anyJSONAPI::Consumer::Error
class.- This is handy when a client wants to re-raise an error with additional information.
- Remove all
Object#send
in favor of the "more secure"Object#public_send
Bugfixes
- Custom Headers will now work correctly with threaded servers such as Puma or Unicorn thanks to the added
request_store
dependency. - A
custom_method
will now obeyResource#route_formatter
setting when generating custom endpoint paths.- For example:
custom_endpoint :publish_now, on: :member, request_method: :post
will now generatehttp://example.com/countries/1/publish-now
whenroute_formatter
is set to:dasherized_route
- For example: