Hi,
Could some on help me to turn the following search into case - insensitive?
Here is the piece of code for earching "title" field in event module:
# Add each field to the conditions array
searchable_fields.each_pair do |field, value|
conditions << "#{field} LIKE ?"
values << "%#{value}%"
end
Here is the data I have entered:
Concert
■Posted by: bancova
■2010-03-14
■boston
test
the "Concert" is the title of this event.
now, when I entered "concert" (small c), I cannot get the event.
however, when I entered "Concert", or "oncert", or "cert"...I can get it.
Could some some friend explain the code and teach me how to make it case insensive?
thanks.