Case Insensitive Search

42 views
Skip to first unread message

Sid Wood

unread,
Mar 28, 2011, 8:51:47 AM3/28/11
to datam...@googlegroups.com
I've resorted to using conditions syntax to preform a case insensitive search.

Widgets.all(:conditions => ['UPPER(name) LIKE ?', "%#{params[:query]}%".upcase])

I feel like I've violated DataMapper with my n00bness.

Is there a better way?
Reply all
Reply to author
Forward
0 new messages