Skip to content

Instantly share code, notes, and snippets.

@dust3d
Created April 22, 2010 03:52
Show Gist options
  • Save dust3d/374792 to your computer and use it in GitHub Desktop.
Save dust3d/374792 to your computer and use it in GitHub Desktop.
class Foo
def self.nearby(lat, lon)
Place.all(:origin => [lat,lon], :within => '.5')
end
end
#then you can call this with
Place.nearby(session[:user_lat], session[:user_lon])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment