I have a model with several attributes, among them title and artist.
The case of title and artist should be ignored in all the Active Record finders.
Basically, if title or artist are present in the :conditions (or dynamically i.e. find_all_by_artist), then the WHERE artist = :artist should become WHERE UPPER(artist) = UPPER(:artist) or something along these lines.
Is there a way of doing it with Rails?
If you are using MySQL database, searches are case insensitive by default. Read the MySQL documentation for more details.
So
findercall such as:Is same as the call below:
Both queries will print the same result: