Skip to content

Instantly share code, notes, and snippets.

@luxerama
Created November 14, 2012 12:29
Show Gist options
  • Save luxerama/4071837 to your computer and use it in GitHub Desktop.
Save luxerama/4071837 to your computer and use it in GitHub Desktop.
Mongoid Moped query in order to get the distance returned by geospacial MongoDB queries
# This works as of Mongoid v3
Model.collection.database.command(geoNear: "models", near: [50, 50])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment