class Way < ActiveRecord::Base
require 'xml/libxml'
+
+ include ConsistencyValidations
set_table_name 'current_ways'
save_with_history!
end
+ def create_with_history(user)
+ check_create_consistency(self, user)
+ if !self.preconditions_ok?
+ raise OSM::APIPreconditionsFailedError.new
+ end
+ self.version = 0
+ self.visible = true
+ save_with_history!
+ end
+
def preconditions_ok?
return false if self.nds.empty?
self.nds.each do |n|