ryanong/mongoid_spacial — Issue #9: Error in documentation
Author: geraudmathe
Created: 2011-11-04 13:09:43+00:00
State: open

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