I can't take Rubocop any more. Moving up to Ruby 3 forces us to update RuboCop,
and it comes with dozens of linters that I'd have to evaluate, none of which is
a marginal improvement. I'm done having opinions.
This function now has two guards against creating comment boxes. The upper one
prevents clicking a second time with the form open. This new lower one prevents
duplicates when the server is very slow to respond (the second click comes
between the first fetch sent and its promise resolving.
diff of `rails routes`:
12,13d11
< GET /newest/:user(.:format) home#newest_by_user
< GET /newest/:user/page/:page(.:format) home#newest_by_user
32d29
< user_threads GET /threads/:user(.:format) comments#user_threads
120,122c117,132
< u GET /u(.:format) users#tree
< user GET /u/:username(.:format) users#show
< user_standing GET /u/:username/standing(.:format) users#standing
---
> users_tree GET /users(.:format) users#tree
> user GET /~:username(.:format) users#show
> user_standing GET /~:username/standing(.:format) users#standing
> GET /~:user/stories(/page/:page)(.:format) home#newest_by_user
> user_threads GET /~:user/threads(.:format) comments#user_threads
> user_ban POST /~:username/ban(.:format) users#ban
> user_unban POST /~:username/unban(.:format) users#unban
> user_disable_invite POST /~:username/disable_invitation(.:format) users#disable_invitation
> user_enable_invite POST /~:username/enable_invitation(.:format) users#enable_invitation
> u GET /u(.:format) redirect(302, /users)
> GET /u/:username(.:format) redirect(302, /~%{username})
> GET /@:username(.:format) redirect(302, /~%{username})
> GET /u/:username/standing(.:format) redirect(302, ~%{username}/standing)
> GET /newest/:user(.:format) redirect(302, ~%{user}/stories)
> GET /newest/:user(/page/:page)(.:format) redirect(302, ~%{user}/stories/page/%{page})
> GET /threads/:user(.:format) redirect(302, ~%{user}/threads)
125,128d134
< user_ban POST /users/:username/ban(.:format) users#ban
< user_unban POST /users/:username/unban(.:format) users#unban
< user_disable_invite POST /users/:username/disable_invitation(.:format) users#disable_invitation
< user_enable_invite POST /users/:username/enable_invitation(.:format) users#enable_invitation