@@ -27,14 +27,13 @@ class Railtie < Rails::Railtie # :nodoc:
27
27
options = app . config . action_controller
28
28
29
29
ActiveSupport . on_load ( :action_controller , run_once : true ) do
30
- ActionController ::Parameters . permit_all_parameters = options . delete ( : permit_all_parameters) { false }
30
+ ActionController ::Parameters . permit_all_parameters = options . permit_all_parameters || false
31
31
if app . config . action_controller [ :always_permitted_parameters ]
32
32
ActionController ::Parameters . always_permitted_parameters =
33
- app . config . action_controller . delete ( : always_permitted_parameters)
33
+ app . config . action_controller . always_permitted_parameters
34
34
end
35
- ActionController ::Parameters . action_on_unpermitted_parameters = options . delete ( : action_on_unpermitted_parameters) do
35
+ ActionController ::Parameters . action_on_unpermitted_parameters = options . action_on_unpermitted_parameters ||
36
36
( Rails . env . test? || Rails . env . development? ) ? :log : false
37
- end
38
37
end
39
38
end
40
39
@@ -53,7 +52,12 @@ class Railtie < Rails::Railtie # :nodoc:
53
52
options . relative_url_root ||= app . config . relative_url_root
54
53
55
54
# Configs used in other initializers
56
- options = options . except ( :log_query_tags_around_actions )
55
+ options = options . except (
56
+ :log_query_tags_around_actions ,
57
+ :permit_all_parameters ,
58
+ :action_on_unpermitted_parameters ,
59
+ :always_permitted_parameters
60
+ )
57
61
58
62
ActiveSupport . on_load ( :action_controller ) do
59
63
include app . routes . mounted_helpers
0 commit comments