diff --git a/lib/jsonapi/rails/controller.rb b/lib/jsonapi/rails/controller.rb index d127f4b..2d46314 100644 --- a/lib/jsonapi/rails/controller.rb +++ b/lib/jsonapi/rails/controller.rb @@ -69,7 +69,10 @@ def deserializable_resource(key, options = {}, &block) before_action(options) do |controller| # TODO(lucas): Fail with helpful error message if _jsonapi not # present. - hash = controller.params[:_jsonapi].to_unsafe_hash + hash = controller.params[:_jsonapi] + .to_unsafe_hash + .with_indifferent_access + ActiveSupport::Notifications .instrument('parse.jsonapi', payload: hash, class: klass) do JSONAPI::Parser::Resource.parse!(hash)