mongoid/mongoid — Issue #1780: Integer id and range searches
Author: yannick
Created: 2012-03-04 09:24:42+00:00
State: open

when having integer ids e.g.
```ruby
class Segment
include Mongoid::Document
field :_id, :type => Integer
end
```
it should be possible to do:
```ruby
Segment.where(id: 3..14).count
#and
Segment.find( 3..5 )
```
currently that gives a
BSON::InvalidDocument: Cannot serialize an object of class Range (type 9) into BSON.