Instead of manually declaring paths, use rails built-in resource routing to generate them and take advantage of path and URL helpers.