]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/user.rb
Eager load nodes and node tags for the way when doing a getway call.
[rails.git] / app / models / user.rb
index ce244fe02448bce114dbb79d25b6a009a4848f28..2adbbb9a19d729acdc5053f54171a1d2d96ee6f5 100644 (file)
@@ -30,7 +30,7 @@ class User < ActiveRecord::Base
   file_column :image, :magick => { :geometry => "100x100>" }
 
   def after_initialize
-    self.creation_time = Time.now if self.creation_time.nil?
+    self.creation_time = Time.now.getutc if self.creation_time.nil?
   end
 
   def encrypt_password
@@ -113,7 +113,7 @@ class User < ActiveRecord::Base
   def delete
     self.active = false
     self.display_name = "user_#{self.id}"
-    self.description = nil
+    self.description = ""
     self.home_lat = nil
     self.home_lon = nil
     self.image = nil