1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Load the Parameters configurations on the right time

We need to configure it only when ActionController::Base is loaded
otherwise configs on initializers will not work.

Closes #29527.
This commit is contained in:
Rafael Mendonça França 2017-07-04 15:32:26 -04:00
parent 2975aeb888
commit 4c8332c296

View file

@ -22,6 +22,7 @@ module ActionController
initializer "action_controller.parameters_config" do |app|
options = app.config.action_controller
ActiveSupport.on_load(:action_controller) do
ActionController::Parameters.permit_all_parameters = options.delete(:permit_all_parameters) { false }
if app.config.action_controller[:always_permitted_parameters]
ActionController::Parameters.always_permitted_parameters =