I want to pass hashset to ActiveRecord finder method Model_name.where({ :key => value }). This works perfectly, but SQL composed from that uses straight comparison =. Is it possible to customize this and switch to LIKE comparison usage with hashset?
I want to pass hashset to ActiveRecord finder method Model_name.where({ :key => value })
Share
The
:key => valuesyntax only works for=,IN, andBETWEENconditions (depending on whethervalueis atomic, an Array, or a Range). Anything else requires you to pass the SQL as a string: