mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Move config.filter_parameters to you own initializer file
This is very rarely changed and does not deserve to be in application.rb
This commit is contained in:
parent
fa6e995a03
commit
23714ec33f
3 changed files with 4 additions and 5 deletions
|
@ -23,9 +23,6 @@ module <%= app_const_base %>
|
|||
# Custom directories with classes and modules you want to be autoloadable.
|
||||
# config.autoload_paths += %W(#{config.root}/extras)
|
||||
|
||||
# Configure sensitive parameters which will be filtered from the log file.
|
||||
config.filter_parameters += [:password]
|
||||
|
||||
# Use SQL instead of Active Record's schema dumper when creating the database.
|
||||
# This is necessary if your schema can't be completely dumped by the schema dumper,
|
||||
# like if you have constraints or database-specific column types.
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
# Configure sensitive parameters which will be filtered from the log file.
|
||||
Rails.application.config.filter_parameters += [:password]
|
|
@ -193,8 +193,8 @@ module ApplicationTests
|
|||
end
|
||||
|
||||
test "filter_parameters should be able to set via config.filter_parameters in an initializer" do
|
||||
app_file 'config/initializers/filter_parameters.rb', <<-RUBY
|
||||
Rails.application.config.filter_parameters += [ :foo, 'bar' ]
|
||||
app_file 'config/initializers/filter_parameters_logging.rb', <<-RUBY
|
||||
Rails.application.config.filter_parameters += [ :password, :foo, 'bar' ]
|
||||
RUBY
|
||||
|
||||
require "#{app_path}/config/environment"
|
||||
|
|
Loading…
Reference in a new issue