X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/0a52a4eb0776874607a321c05c65c656abb85b7e..03eb6ce048047826cb40d73e755702ec51b916d5:/app/models/user.rb diff --git a/app/models/user.rb b/app/models/user.rb index 1db8adab7..d2535bbd4 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -10,7 +10,7 @@ class User < ActiveRecord::Base has_many :friends, :include => :befriendee, :conditions => "users.status IN ('active', 'confirmed')" has_many :tokens, :class_name => "UserToken" has_many :preferences, :class_name => "UserPreference" - has_many :changesets + has_many :changesets, :order => 'created_at DESC' has_many :client_applications has_many :oauth_tokens, :class_name => "OauthToken", :order => "authorized_at desc", :include => [:client_application] @@ -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)