Add always permitted parameters as a configurable option.#15933
Add always permitted parameters as a configurable option.#15933rafaelfranca merged 2 commits intorails:masterfrom
Conversation
rafael
commented
Jun 27, 2014
- This commit adds back the always_permitted_parameters configuration option to strong parameters.
- The initial pull requests where this feature was added are the following:
- make always permitted parameters configurable #12682
- making always permitted params configurable strong_parameters#174
* This commit adds back the always_permitted_parameters configuration option to strong paramaters. * The initial pull requests where this feature was added are the following: - rails#12682 - rails/strong_parameters#174
|
Nice! 💃 |
|
We need to update the configuring guide and also make sure if you change this configuration adding a parameter it will not raise if the parameter is present. |
|
BTW, thank you for the patch. |
|
@rafaelfranca no problem. Quick questions:
Thanks! |
There was a problem hiding this comment.
Maybe we can do something like:
# config. For instance:
#
# config.always_permitted_parameters = %w( controller action format )Thus we will have syntax highlighting and this reads a bit better. What do you think ? :-)
yes.
In the Action Pack section of https://github.com/rails/rails/blob/master/guides/source/configuring.md
Right now we only have test to make sure |
|
@rafaelfranca: Awesome! Thanks for the feedback. I will add those changes to the PR. |
* General style fixes. * Add changes to configuration guide. * Add missing tests.
|
@rafaelfranca What do you think? I added the changes and also one more test for the deprecation warning. |
|
Very good ❤️. I'll add a CHANGELOG entry and merge it. Thanks. |
Add always permitted parameters as a configurable option. [Rafael Mendonça França + Gary S. Weaver]
…D_PARAMS` `NEVER_UNPERMITTED_PARAMS` is deprecated in Rails 4.2. See rails#15933.