show nearest 10 users (request by Blackadder)
This commit is contained in:
parent
b82c10bcd1
commit
914cad0aa2
1 changed files with 1 additions and 1 deletions
|
@ -74,7 +74,7 @@ class User < ActiveRecord::Base
|
||||||
return el1
|
return el1
|
||||||
end
|
end
|
||||||
|
|
||||||
def nearby(radius = 50, num = 5)
|
def nearby(radius = 50, num = 10)
|
||||||
if self.home_lon and self.home_lat
|
if self.home_lon and self.home_lat
|
||||||
gc = OSM::GreatCircle.new(self.home_lat, self.home_lon)
|
gc = OSM::GreatCircle.new(self.home_lat, self.home_lon)
|
||||||
bounds = gc.bounds(radius)
|
bounds = gc.bounds(radius)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue