ruby on rails 3 - Rails3 activerecord hashset customization -
ruby on rails 3 - Rails3 activerecord hashset customization -
i want pass hashset activerecord finder method model_name.where({ :key => value })
. works perfectly, sql composed uses straight comparing =. possible customize , switch comparing usage hashset?
the :key => value
syntax works =
, in
, , between
conditions (depending on whether value
atomic, array, or range). else requires pass sql string:
model.where("key ?", value)
ruby-on-rails-3 activerecord hashset
Comments
Post a Comment