ActiveRecord OR query behavior when first argument is nil
There is a record with foo=nil and bar=43. Why does the following query does not match that record. Should it not just check only foo since it matches with the given value (i.e nil)?
myrecords.where("foo = ? OR bar = ?", nil, 42).first
Aucun commentaire:
Enregistrer un commentaire