]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/user.rb
Merge r17285 from the oauth branch - allow flash access to set headers, even when...
[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