end
def save_with_history!
+ t = Time.now
+
Way.transaction do
- t = Time.now
self.timestamp = t
self.save!
+ end
+ WayTag.transaction do
tags = self.tags
WayTag.delete_all(['id = ?', self.id])
tag.id = self.id
tag.save!
end
+ end
+ WaySegment.transaction do
segs = self.segs
WaySegment.delete_all(['id = ?', self.id])
seg.save!
i += 1
end
-
- old_way = OldWay.from_way(self)
- old_way.timestamp = t
- old_way.save_with_dependencies!
end
+
+ old_way = OldWay.from_way(self)
+ old_way.timestamp = t
+ old_way.save_with_dependencies!
end
def preconditions_ok?