]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/user.rb
Update to rails 2.3.4 for security fixes.
[rails.git] / app / models / user.rb
index ae5b0b74f708b5b94ba5fc09242762b904c36955..9d7d233b7276f612eb420f56e4991e741e6c3aee 100644 (file)
@@ -33,7 +33,7 @@ class User < ActiveRecord::Base
   file_column :image, :magick => { :geometry => "100x100>" }
 
   def after_initialize
-    self.creation_time = Time.now.getutc if self.creation_time.nil?
+    self.creation_time = Time.now.getutc unless self.attribute_present?(:creation_time)
   end
 
   def encrypt_password