Skip to content

Commit 6d49925

Browse files
authored
Merge pull request #67 from cassidycodes/indifferent-access
Adding with_indiferent_access to controller params
2 parents d8078b3 + 69e9d5d commit 6d49925

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/jsonapi/rails/controller/deserialization.rb

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ def deserializable_resource(key, options = {}, &block)
4949
Class.new(JSONAPI::Rails::DeserializableResource, &block)
5050

5151
before_action(options) do |controller|
52-
hash = controller.params.to_unsafe_hash[:_jsonapi]
52+
hash = controller.params.to_unsafe_hash
53+
.with_indifferent_access[:_jsonapi]
5354
if hash.nil?
5455
JSONAPI::Rails.logger.warn do
5556
"Unable to deserialize #{key} because no JSON API payload was" \

0 commit comments

Comments
 (0)