Skip to content

Commit 1cbac69

Browse files
authored
Merge pull request #1 from zestyzesty/support-rails-4.2
use indifferent access
2 parents 5bd5419 + a1a5ae0 commit 1cbac69

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)