Fix issue with url_for in Rails 4.0.1

Caused by
https://github.com/rails/rails/commit/aba0a17a61000ef43a51d7e9f63a0c209ba87cc6