X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/fcc485725dac6c31c6e01db5142d15e9b35f6509..4954f65061d593d3618ae6e2246151baca033921:/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