X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/cb330ffd7a1861830c813d35507ef4b8b288d8f0..7151fa05e4d4f73956d7f9a7ad2db1f5b956a0c0:/app/models/user.rb?ds=sidebyside diff --git a/app/models/user.rb b/app/models/user.rb index dc461e855..61c76898a 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -25,6 +25,8 @@ class User < ActiveRecord::Base before_save :encrypt_password + file_column :image, :magick => { :geometry => "100x100>" } + def after_initialize self.creation_time = Time.now if self.creation_time.nil? end @@ -74,7 +76,7 @@ class User < ActiveRecord::Base return el1 end - def nearby(radius = 50, num = 5) + def nearby(radius = 50, num = 10) if self.home_lon and self.home_lat gc = OSM::GreatCircle.new(self.home_lat, self.home_lon) bounds = gc.bounds(radius)