Get the timestamp outside the transactionso everything can see it.
This commit is contained in:
parent
b948dd6d52
commit
603d1be4bd
1 changed files with 2 additions and 1 deletions
|
@ -143,8 +143,9 @@ class Way < ActiveRecord::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
def save_with_history!
|
def save_with_history!
|
||||||
|
t = Time.now
|
||||||
|
|
||||||
Way.transaction do
|
Way.transaction do
|
||||||
t = Time.now
|
|
||||||
self.timestamp = t
|
self.timestamp = t
|
||||||
self.save!
|
self.save!
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue