提交 5c8b4c6e 编写于 作者: W wycats

Move filter_parameter_logger to deprecated.rb

上级 79d194e9
...@@ -6,6 +6,15 @@ def deprecated_config_accessor(option, message = nil) ...@@ -6,6 +6,15 @@ def deprecated_config_accessor(option, message = nil)
deprecated_config_writer(option, message) deprecated_config_writer(option, message)
end end
# This method has been moved to ActionDispatch::Request.filter_parameters
def filter_parameter_logging(*args, &block)
ActiveSupport::Deprecation.warn("Setting filter_parameter_logging in ActionController is deprecated and has no longer effect, please set 'config.filter_parameters' in config/application.rb instead", caller)
filter = Rails.application.config.filter_parameters
filter.concat(args)
filter << block if block
filter
end
def deprecated_config_reader(option, message = nil) def deprecated_config_reader(option, message = nil)
message ||= "Reading #{option} directly from ActionController::Base is deprecated. " \ message ||= "Reading #{option} directly from ActionController::Base is deprecated. " \
"Please read it from config.#{option}" "Please read it from config.#{option}"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册