How can I replicate twitter usernames to a URL insensitive:
And with all these URLs, the user page opens when it has a username saved as "MY_Name", etc.
And the Model.find method ('my_NAmE') finds a user record named MY_Name.
The way you make the comparison case insensitive is to normalize the case both in the database and in the search, so that the search always returns the result regardless of the input.
Always delete user names before saving to the database
Model.find(params[:id].to_s.downcase)
.
, , . .