]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/user.rb
Use configuration variables for limiting nearby users, and bump the number to 30
[rails.git] / app / models / user.rb
index 1db8adab7fcea045f4b1a05516859a57aa579043..c2d73ed98c45d2ff320f435e382f153f1dc33419 100644 (file)
@@ -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)