ryanong / mongoid_spacial

A Mongoid Extention that simplifies and adds support for MongoDB Geo Spacial Calculations.
MIT License
138 stars 63 forks source link

Error in documentation #9

Closed geraudmathe closed 13 years ago

geraudmathe commented 13 years ago

Hi guys !

While i was reading the documentation, i've seen that you tell to use the method distance_from() with these arguments :

Place.distance_from(:field_source, [-74,40], :mi)

But il looks that you need to set the unit in a hash like this :

Place.distance_from(:field_source, [-74,40], {:unit=>:mi})

Only the second way works for me. It could be confusing for users

Bye

ryanong commented 13 years ago

thx for the report!