mongoid / origin

A Ruby DSL for building MongoDB queries
http://mongoid.org/en/origin/index.html
MIT License
62 stars 29 forks source link

adding support for $geoWithin #81

Closed arthurnn closed 10 years ago

arthurnn commented 11 years ago

Replacing $within with $geoWithin as in mongodb2.4 $within was deprecated. geoWithin docs: http://docs.mongodb.org/manual/reference/operator/geoWithin/ [related mongoid/moped#193]

durran commented 11 years ago

Well this is kind of half done... You've replaced $within with $geoWithin but are still using the legacy coordinate system... To say it's fully complete we need to support the new geoJSON features, as described here:

http://docs.mongodb.org/manual/reference/operator/geoWithin/

durran commented 11 years ago

I would do this as a completely separate feature...

So... queryable.geo_within_box and queryable.where(:field.geo_within_box), etc.

arthurnn commented 11 years ago

good catch...:scream: working on it today..