This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hola Rails people. I have a column in my database that I need to treat | |
as case-insensitive. The standard solution to this is to downcase the | |
value before inserting it into the database, and when doing | |
searches. My problems with this are: | |
1. I have to make calls to String#downcase in several places where I | |
*really* mean "this is case-insensitive" | |
2. I can only provide automatic-downcasing when going through the API | |
I provide. Anyone calling MyClass.where(:name => foo) has to know to |