How to test:
Log out as a user (with and without JS enabled)
Log out as an admin (with and without JS enabled)
To avoid the styling changes, you could use link_to's method to make the link work when JS is enabled, and add a GET page with a logout form (“are you sure you want to log out?“) as the fallback when JS is not enabled. It’s similar to how we set up the login page.
Thanks for tracking down the no-JS non-GET issues! It’s a pretty widespread problem, we can have another issue (or many), but you don’t have to deal with them here.
Due to RL stuff, I unfortunately won't be able to work on this anymore. Closing the PR and unassigning the Jira issue, whoever wants to pick it back up can take a look at my code I guess.
reviewer: redsummernight
Note that PR requests we credit Alix R.
The top-right “Log Out” link looks the same with or without JS.
Logging out works with JS as usual.
Without JS, “Log Out” leads to a new page with a log out form using method='post'. “Yes, Log Out“ correct logs me out.
Looks good.
Tested as a user and an admin, with and without JavaScript. I was able to log out as expected every time. The new log out page looked good even when shrinking my browser window to resemble a phone’s width.
This is ready for release!