Skip to content
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

Update code snippets to suggest the use of strong parameters #38595

Merged
merged 1 commit into from
Mar 12, 2020
Merged

Update code snippets to suggest the use of strong parameters #38595

merged 1 commit into from
Mar 12, 2020

Conversation

dylnclrk
Copy link
Contributor

Summary

Examples for flash and session had code that would might end up raising ForbiddenAttributesErrors. Tweak the code to suggest the use of strong parameters.

Other Information

I'm not sure what would be more helpful, the examples as-is are a little bit more direct and simple. But I did do a double-take when I saw them, which to me seemed like a good reason to make the change.

I could see someone copy-pasting this and being confused at the error that's raised. But now the examples are missing definitions for the client_/comment_params methods, so… I'm not sure what's better. 🤷‍♂

Examples for flash and session had code that would generally
raise ForbiddenAttributesErrors. Tweak the examples to avoid
this potentially misleading example. [ci skip]
@rails-bot rails-bot bot added the docs label Feb 28, 2020
@dylnclrk
Copy link
Contributor Author

dylnclrk commented Feb 28, 2020

Oops, I added [ci skip] to the commit message, but it appears as if CI is still running. My bad…

Perhaps it has to be in the first line of the commit msg?

@rafaelfranca rafaelfranca merged commit 6020bf3 into rails:master Mar 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants