lib/mongoid/criterion/selector.rb in mongoid-2.3.0 vs lib/mongoid/criterion/selector.rb in mongoid-2.3.1

- old
+ new

@@ -110,9 +110,14 @@ end when Array value.map { |v| typecast_value_for(field, v) } when Regexp value + when Range + { + "$gte" => typecast_value_for(field, value.first), + "$lte" => typecast_value_for(field, value.last) + } else if field.type == Array Serialization.mongoize(value, value.class) else field.serialize(value)