Permalink
Browse files

Move config.filter_parameters to you own initializer file

This is very rarely changed and does not deserve to be in application.rb
  • Loading branch information...
1 parent fa6e995 commit 23714ec33ffd87d314d74f3b4ff6b6075a652be8 @rafaelfranca rafaelfranca committed Jan 5, 2013
@@ -23,9 +23,6 @@ class Application < Rails::Application
# 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 @@ def teardown
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"

0 comments on commit 23714ec

Please sign in to comment.