Skip to content

Commit a1a5ae0

Browse files
author
Gregory Kohler
committed
use indifferent access
see jsonapi-rb#67 I just did this from the v0.3.1 tag and that PR does it from HEAD which is not published.
1 parent 5bd5419 commit a1a5ae0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/jsonapi/rails/controller.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,10 @@ def deserializable_resource(key, options = {}, &block)
6969
before_action(options) do |controller|
7070
# TODO(lucas): Fail with helpful error message if _jsonapi not
7171
# present.
72-
hash = controller.params[:_jsonapi].to_unsafe_hash
72+
hash = controller.params[:_jsonapi]
73+
.to_unsafe_hash
74+
.with_indifferent_access
75+
7376
ActiveSupport::Notifications
7477
.instrument('parse.jsonapi', payload: hash, class: klass) do
7578
JSONAPI::Parser::Resource.parse!(hash)

0 commit comments

Comments
 (0)