diff options
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/generators/rails/app/templates/config/application.rb | 2 | ||||
-rw-r--r-- | railties/lib/rails/application.rb | 1 | ||||
-rw-r--r-- | railties/lib/rails/configuration.rb | 7 |
3 files changed, 4 insertions, 6 deletions
diff --git a/railties/lib/generators/rails/app/templates/config/application.rb b/railties/lib/generators/rails/app/templates/config/application.rb index ecebbc6146..78a355d2f4 100644 --- a/railties/lib/generators/rails/app/templates/config/application.rb +++ b/railties/lib/generators/rails/app/templates/config/application.rb @@ -32,6 +32,6 @@ module <%= app_const_base %> # end # Configure sensitive parameters which will be filtered from the log file. - config.filter_parameters :password + config.filter_parameters << :password end end diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb index 743681359c..5c9892c630 100644 --- a/railties/lib/rails/application.rb +++ b/railties/lib/rails/application.rb @@ -110,6 +110,7 @@ module Rails end def call(env) + env["action_dispatch.parameter_filter"] = config.filter_parameters app.call(env) end diff --git a/railties/lib/rails/configuration.rb b/railties/lib/rails/configuration.rb index c7331f79c5..7f1783a6b9 100644 --- a/railties/lib/rails/configuration.rb +++ b/railties/lib/rails/configuration.rb @@ -69,7 +69,7 @@ module Rails class Configuration < Railtie::Configuration attr_accessor :after_initialize_blocks, :cache_classes, :colorize_logging, - :consider_all_requests_local, :dependency_loading, + :consider_all_requests_local, :dependency_loading, :filter_parameters, :load_once_paths, :logger, :metals, :plugins, :preload_frameworks, :reload_plugins, :serve_static_assets, :time_zone, :whiny_nils @@ -83,6 +83,7 @@ module Rails super @load_once_paths = [] @after_initialize_blocks = [] + @filter_parameters = [] @dependency_loading = true @serve_static_assets = true end @@ -252,10 +253,6 @@ module Rails i18n end end - - def filter_parameters(*filter_words, &block) - ActionDispatch::Request.filter_parameters(*filter_words, &block) - end def environment_path "#{root}/config/environments/#{Rails.env}.rb" |