Adding with_indiferent_access to controller params#67
Merged
dawidof merged 1 commit intojsonapi-rb:masterfrom Jun 27, 2019
Merged
Adding with_indiferent_access to controller params#67dawidof merged 1 commit intojsonapi-rb:masterfrom
dawidof merged 1 commit intojsonapi-rb:masterfrom
Conversation
In Rails 4.2, `to_unsafe_hash` converts the `params` to a Hash and the values can only be accessed with the keys as strings. This change allows for compatibility with Rails 4.2.
Author
|
@beauby I've tested this against Rails 5.1.4 both in a controller test and by sending a |
Member
|
Thanks for the PR @cassidycodes. I'll need a bit more time to figure out whether there's a better solution, but I'm keeping this under my radar. |
Author
|
@beauby Ok, let me know if you want any changes on this PR. |
gmkohler
pushed a commit
to zestyzesty/jsonapi-rails
that referenced
this pull request
Feb 4, 2018
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.
|
Bumping this up too - can this PR be reviewed? We're still on Rails 4.2. |
|
@dawidof thanks for merging - Looking forward to a new release! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In Rails 4.2,
to_unsafe_hashconverts theparamsto a Hash and thevalues can only be accessed with the keys as strings.
This change allows for compatibility with Rails 4.2.