The fact that you need to assign it to a local is probably caused by the fact that the implementation of `allowed_methods_for_route` is expensive. Called twice it will cost time. Instead, modify the implementation of `allowed_methods_for_route` to do something like this, and get rid of the unnecessary local:

``` ruby
@allowed_methods_for_route ||= begin
  ...
end
```