all this code can be replaced with
```ruby
routes.group_by(&:method)
```