Use _url routes instead of _path
Use scope instead of constraints to define routes.
It works the same with rails 3 and rails 4.
Merge pull request #2960 from kgiszczak/redirect-url-tweaks

Use full urls instead of just paths when redirecting in failure app.