How do I handle uppercase and lowercase characters in a custom url?
问题 I want to let users have links to their profiles using their registered usernames. I store their username exactly how they give it. I set up my routes to match /:name and then used find_by_name to get it. The problem I have is when you type in example.com/username it doesn't work the name: Username. (Note the uppercase/lowercase difference) So my question is how can I ignore case in urls? 回答1: You can store the username downcased along with a display_name which is in the format they gave it