Get the timestamp outside the transactionso everything can see it.
[rails.git] / app / models / way.rb
index 8474bcb38b589e6f7132f06ac99f44b8beae8382..c65119235372875d120c28f816e27dd3beb76ac6 100644 (file)
@@ -143,8 +143,9 @@ class Way < ActiveRecord::Base
   end
 
   def save_with_history!
   end
 
   def save_with_history!
+    t = Time.now
+
     Way.transaction do
     Way.transaction do
-      t = Time.now
       self.timestamp = t
       self.save!
     end
       self.timestamp = t
       self.save!
     end