Permalink
Browse files

Revert unintential change to filter parameters

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4308 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 0049bd7 commit 869c41d8d6593b1c50d9354a32adf0bd38fddeb1 Marcel Molina committed Apr 29, 2006
Showing with 16 additions and 18 deletions.
  1. +16 −18 actionpack/lib/action_controller/base.rb
@@ -373,26 +373,24 @@ def hide_action(*names)
def filter_parameter_logging(*filter_words, &block)
parameter_filter = Regexp.new(filter_words.collect{ |s| s.to_s }.join('|'), true) if filter_words.length > 0
- class << self
- define_method(:filter_parameters) do |unfiltered_parameters|
- filtered_parameters = {}
-
- unfiltered_parameters.each do |key, value|
- if key =~ parameter_filter
- filtered_parameters[key] = '[FILTERED]'
- elsif value.is_a?(Hash)
- filtered_parameters[key] = filter_parameters(value)
- elsif block_given?
- key, value = key.dup, value.dup
- yield key, value
- filtered_parameters[key] = value
- else
- filtered_parameters[key] = value
- end
+ define_method(:filter_parameters) do |unfiltered_parameters|
+ filtered_parameters = {}
+
+ unfiltered_parameters.each do |key, value|
+ if key =~ parameter_filter
+ filtered_parameters[key] = '[FILTERED]'
+ elsif value.is_a?(Hash)
+ filtered_parameters[key] = filter_parameters(value)
+ elsif block_given?
+ key, value = key.dup, value.dup
+ yield key, value
+ filtered_parameters[key] = value
+ else
+ filtered_parameters[key] = value
end
-
- filtered_parameters
end
+
+ filtered_parameters
end
end
end

0 comments on commit 869c41d

Please sign in to comment.