Closed camdixon closed 10 years ago
If you specify a bare path like "logout" it is considered a relative URL. If you specify it as "/logout" it should always work. Better yet, use whatever URL helpers you have from the router. I bet you have a logout_path
method that would work. Then you can stay a little more separated from your exact URLs.
When a user is logged in, sometimes I get an error: No route matches [GET] "/users/1/logout"
So when I am logged in and the URL is showing /users my logout button works. When I am under a particular user such as /users/1/edit the logout button throws the error. Clearly my routes.rb file does not know it's there. How can I fix this?
My routes file looks like this
Here is the code to the view where it does not work.