It looks like modifying the `controller_for` method with passing in the `@request.method` parameter would make more sense here rather than duplicating this Rails lookup method.

Something like:
```
def controller_for(path, method)
  Rails.application.routes.recognize_path(path, :method => method)[:controller]
end
```

And then this line becomes: `controller_for(@request.path, @request.method)`.

Would you mind updating to do this?