Reputation: 1614
With the geocoder gem, if I wanted to find pictures nearby one particular picture by a mile I could do pictures.nearby(1) but what if I had a user with a location and wanted to find pictures nearby my user, how would I do that
Upvotes: 0
Views: 153
Reputation: 8063
Instead of nearby() you can use
Pictures.near([u.lat, u.lon], 1) # venues within 1 miles of a user
See GitHub/geocoder
Upvotes: 1