How should I write a query to find records where a value is NaN?
> Person.where(age: NaN)
NameError: uninitialized constant NaN
How should I write a query to find records where a value is NaN?
> Person.where(age: NaN)
NameError: uninitialized constant NaN
If you don't necessarily need to get a AR collection as a result of selection, but will be ok with an array, you can do it like this:
Person.all.select{ |p| p.age.nan? }