presidentbeef/brakeman — pull request #177 by presidentbeef (2012-11-08 03:40:37+00:00)
Title: Fix false positive redirect to decorated models

This fixes the false positive in #172 with redirects to models decorated using the Draper gem.

However, Brakeman doesn't really know about decorators, so this fix assumes the decorator will be named `SomethingDecorator`. From the examples, this appears to be an okay assumption. I'd like to check for inheritance from `Draper::Base` but we just don't have that information and I'm not sure it's worth adding.

As a bonus, this pull request also fixes false positives on redirects to multiple values in an `or`, like:

```ruby
user = User.find(params[:id])

if user.nil?
user = User.find(params[:other_id])
end

redirect_to user
```