X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/786bc55209b927b74570125a26864e161a32d425..0975858cdb3430a7f717b3c972c3d6eb6e205784:/app/models/node.rb diff --git a/app/models/node.rb b/app/models/node.rb index 230c83882..7e78aaf59 100644 --- a/app/models/node.rb +++ b/app/models/node.rb @@ -68,18 +68,12 @@ class Node < ActiveRecord::Base return node end - def save_with_history - begin - Node.transaction do - self.timestamp = Time.now - self.save! - old_node = OldNode.from_node(self) - old_node.save! - end - - return true - rescue - return nil + def save_with_history! + Node.transaction do + self.timestamp = Time.now + self.save! + old_node = OldNode.from_node(self) + old_node.save! end end