diogob/activerecord-postgres-earthdistance — pull request #3 by Andrekra (2013-11-21 16:25:47+00:00)
Title: order records based on distance of a point

I came across the issue where I wanted to sort the records based on the users current location (Bars in range), so I made this. Hope you like it

```ruby
user_coords = [20,30]
Place.within_radius(500, 30, 50).order_by_distance(user_coords[0], user_coords[1])
```