Skip to content

Instantly share code, notes, and snippets.

View tsoto111's full-sized avatar

Tavo Soto tsoto111

View GitHub Profile
@renato-zannon
renato-zannon / patch.rb
Created March 20, 2014 19:21
Fix rails 2.3 filter_parameter_logging for ruby 2.x
# The filter_parameter_logging method, used to filter request parameters
# (such as passwords) from the log, defines a protected method called
# filter_parameter when called. Its existence is later tested using
# respond_to?, without the include_private parameter. Due to the respond_to?
# behavior change, the method existence is never detected, and parameter
# filtering stops working.
require 'action_controller'
module ParameterFilterPatch
def respond_to?(method, include_private = false)