bugsnag/bugsnag-ruby — pull request #171 by Umofomia (2014-11-06 23:04:23+00:00)
Title: Fix parameter filtering in Rails 2.

Rails 2 does parameter filtering via [a dynamically-defined method on the controller](https://github.com/rails/rails/blob/2-3-stable/actionpack/lib/action_controller/base.rb#L486). For this reason, these parameters are not accessible to the Bugsnag configuration and the filtering must be done while we still have the controller object.

I ran into this issue because I have an old Rails 2 project with custom filtered parameters and I noticed they were being sent to Bugsnag without being filtered out. This change introduces a `FilteredRequest` class that wraps the request object. When its `#parameters` method is called, it calls the dynamically-generated `#filter_parameters` method on the controller if it exists.