| Class | ActiveRecord::Extensions::ArrayExt |
| In: |
ar-extensions/lib/ar-extensions/extensions.rb
|
| Parent: | Object |
ActiveRecord::Extension to translate an Array of values into the approriate IN( … ) or NOT IN( … ) SQL.
Model.find :all, :conditions=>{ :id => [ 1,2,3 ] }
# the following three calls are equivalent
Model.find :all, :conditions=>{ :id_ne => [ 4,5,6 ] }
Model.find :all, :conditions=>{ :id_not => [ 4,5,6 ] }
Model.find :all, :conditions=>{ :id_not_in => [ 4,5,6 ] }
| NOT_EQUAL_RGX | = | /(.+)_(ne|not|not_in)/ |