Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion lib/jsonapi/rails/controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down