]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/node.rb
All API 0.6 functional tests now pass.
[rails.git] / app / models / node.rb
index 39e1228acf80c8dd41f6d2c4be520c80be736637..d6a5143db1c3ec94263ef701177bc25201a28d89 100644 (file)
@@ -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