X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/3d24694addd628cc55a3d2a24d736e61cbd55273..fb5f39f19ae00dad9ec896e216e8e813de42c151:/app/models/node.rb diff --git a/app/models/node.rb b/app/models/node.rb index 39e1228ac..d6a5143db 100644 --- a/app/models/node.rb +++ b/app/models/node.rb @@ -2,6 +2,7 @@ class Node < ActiveRecord::Base require 'xml/libxml' include GeoRecord + include ConsistencyValidations set_table_name 'current_nodes' @@ -160,6 +161,13 @@ class Node < ActiveRecord::Base self.visible = true save_with_history! end + + def create_with_history(user) + check_create_consistency(self, user) + self.version = 0 + self.visible = true + save_with_history! + end def to_xml doc = OSM::API.new.get_xml_doc