Its very easy to perform case insensitive searches in Rails as well as any SQL queries. SQL some useful functions to do so. Either you can UpCase or DownCase both the operands to perform such searching operations.
Comment.where("LOWER(comments.comment) LIKE LOWER('%test%')") Comment.where('lower(name) = lower(?)', comment_one.name)
using the above example may hamper the portability of your application as function in different SQLs may vary. The example below is recommended
comments = Comment.arel_table Comment.where(comments[:comment].matches("%test%"))