Use configuration variables for limiting nearby users, and bump the number to 30
This commit is contained in:
parent
b5e28f092f
commit
6d51e77880
2 changed files with 5 additions and 1 deletions
|
@ -107,7 +107,7 @@ class User < ActiveRecord::Base
|
|||
(languages & array.collect { |i| i.to_s }).first
|
||||
end
|
||||
|
||||
def nearby(radius = 50, num = 10)
|
||||
def nearby(radius = NEARBY_RADIUS, num = NEARBY_USERS)
|
||||
if self.home_lon and self.home_lat
|
||||
gc = OSM::GreatCircle.new(self.home_lat, self.home_lon)
|
||||
bounds = gc.bounds(radius)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue