Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Error in documentation #9

Closed
geraudmathe opened this Issue Nov 4, 2011 · 1 comment

Comments

Projects
None yet
2 participants

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 added a commit that referenced this issue Nov 8, 2011

Owner

ryanong commented Nov 8, 2011

thx for the report!

@ryanong ryanong closed this Nov 8, 2011

niedhui pushed a commit to niedhui/mongoid_spacial that referenced this issue Sep 26, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment