Skip to content
Jasiek Matusz edited this page Dec 6, 2019 · 3 revisions

If the input is in a different convention than :snake, you should specify that.

You can do it in two ways:

  • in an initializer, simply create initializers/jsonapi_parameters.rb with contents similar to:
# config/initializers/jsonapi_parameters.rb
 
 JsonApi::Parameters.ensure_underscore_translation = true
  • while calling .from_jsonapi, for instance: .from_jsonapi(:camel). The value does not really matter, as anything different than :snake will result in deep keys transformation provided by ActiveSupport.
Clone this wiki locally