WHen I use deseriable_recource :reply_post in my controller here is the error I get :
undefined method `to_unsafe_hash' for nil:NilClass
Extracted source (around line #72):
#70 # TODO(lucas): Fail with helpful error message if _jsonapi not
#71 # present.
*72 hash = controller.params[:_jsonapi].to_unsafe_hash
#73 ActiveSupport::Notifications
#74 .instrument('parse.jsonapi', payload: hash, class: klass) do
#75 JSONAPI::Parser::Resource.parse!(hash)
If I remove the method, params is the usual hash :
<ActionController::Parameters {"data"=>{"attributes"=>{"reply"=>nil, "invisible-to-user"=>false, "created-at"=>nil}, "relationships"=>{"ticket"=>{"data"=>{"type"=>"tickets", "id"=>"65"}}}, "type"=>"ticket/replies"}, "controller"=>"marketadmin_api/v1/ticket/replies", "action"=>"create"} permitted: false>
Despite the request being a application/vnd.api+json with the following content :
{"data":{"attributes":{"reply":null,"invisible-to-user":false,"created-at":null},"relationships":{"ticket":{"data":{"type":"tickets","id":"65"}}},"type":"ticket/replies"}}
Why is JSONAPI-RB trying to find _jsonapi in the params ?
WHen I use deseriable_recource
:reply_post
in my controller here is the error I get :If I remove the method, params is the usual hash :
<ActionController::Parameters {"data"=>{"attributes"=>{"reply"=>nil, "invisible-to-user"=>false, "created-at"=>nil}, "relationships"=>{"ticket"=>{"data"=>{"type"=>"tickets", "id"=>"65"}}}, "type"=>"ticket/replies"}, "controller"=>"marketadmin_api/v1/ticket/replies", "action"=>"create"} permitted: false>
Despite the request being a application/vnd.api+json with the following content :
{"data":{"attributes":{"reply":null,"invisible-to-user":false,"created-at":null},"relationships":{"ticket":{"data":{"type":"tickets","id":"65"}}},"type":"ticket/replies"}}
Why is JSONAPI-RB trying to find _jsonapi in the params ?