1
0
Fork 0
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:
Rafael Mendonça França 2013-01-05 15:41:39 -03:00
parent fa6e995a03
commit 23714ec33f
3 changed files with 4 additions and 5 deletions

View file

@ -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.

View file

@ -0,0 +1,2 @@
# Configure sensitive parameters which will be filtered from the log file.
Rails.application.config.filter_parameters += [:password]

View file

@ -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"