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

Popular posts from this blog

c# - Move local mssql database to webhosted MYSQL -

java - How to pass parameters between Request-Scoped Controllers? -

string - what is the difference between "some" == "some\0" and strcmp("some","some\0") in c++? -