From b1bc3b3cd352f68d79d7e232e9520eacb56ca41e Mon Sep 17 00:00:00 2001 From: Prem Sichanugrist Date: Thu, 21 Jan 2010 11:48:27 +0700 Subject: Add deprecation warning for calling filter_parameter_logging ActionController::Base, and allow it to be configured in config.filter_parameters MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: José Valim --- railties/test/application/configuration_test.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'railties/test/application') diff --git a/railties/test/application/configuration_test.rb b/railties/test/application/configuration_test.rb index 79dfacdcdb..8c08fe5acc 100644 --- a/railties/test/application/configuration_test.rb +++ b/railties/test/application/configuration_test.rb @@ -122,5 +122,17 @@ module ApplicationTests require "#{app_path}/config/environment" end end + + test "filter_parameters should be able to set via config.filter_parameters" do + add_to_config <<-RUBY + config.filter_parameters :foo, 'bar' do |key, value| + value = value.reverse if key =~ /baz/ + end + RUBY + + assert_nothing_raised do + require "#{app_path}/config/application" + end + end end end -- cgit v1.2.3