On my rap lyrics explanation website, every user has an associated "favorites" page at http://rapgenius.com/USERNAME
Because these favorites pages occupy the root namespace, I have to make sure that no one takes a username that I'm already using for something else. E.g.:
/songs
/lyrics
/users
/posts
How can I look up all top-level paths that have higher precedence than the /username
route (which is at the bottom of routes.rb
) at the time of user creation so I can prevent users from taking these reserved names?