dataset = dataset.where(:headline.like("%" + headline + "%")) if headline.present?
I have a search form where i can search for headlines. But the headline search is case sensitive :S. This is the comparison oh the headline and the headline in the dataset. Thought like wasnt case sensitive :S Is ther somethin else that is not case sensitive?
I found the solution.
Apparently there’s a method ilike, that works the same way as ‘like’ but that is case insensitive.
For some weird reason it’s not on APIdock, but trust me, it works. ( http://apidock.com/rails/search?query=ilike )