-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rails5 - params no longer inherits from HashWithIndifferentAccess #18
Comments
Hi @scottbarrow ! I'm not really using the library anymore but I'd be happy to review a PR to fix this if you have the time. If not, I'll try to have a look at some point. Either way, thanks for reporting the issue! |
well the library needs to be updated to support Rails strong params as opposed to expecting a naked params hash. If the params are not "permitted" the param values are not accessible. I don't know enough about the gem since I was only doing maintenance updates, however from what I can tell maybe it's better to send |
@scottbarrow I've pushed up a branch that I believe will fix this issue. Can you test and let me know if it works for you? https://github.com/jasondew/data_table/tree/rails5-strong-params-bugfix |
awesome thanks, that should work |
issue:
undefined method `map' for #<ActionController::Parameters
https://github.com/jasondew/data_table/blob/master/lib/data_table/base.rb#L10
calls
controller.params.map
.In Rails 5+ params no longer inherits from HashWithIndifferentAccess. enumerable methods are not available on Strong param objects.
It might not be good enough to simply call
to_h
since any non permitted params will be excluded from the resulting hash.The text was updated successfully, but these errors were encountered: