+ def update_from(new_way, user)
+ check_consistency(self, new_way, user)
+ if !new_way.preconditions_ok?
+ raise OSM::APIPreconditionFailedError.new
+ end
+ self.changeset_id = new_way.changeset_id
+ self.tags = new_way.tags
+ self.nds = new_way.nds
+ self.visible = true
+ save_with_history!
+ end
+
+ def create_with_history(user)
+ check_create_consistency(self, user)
+ if !self.preconditions_ok?
+ raise OSM::APIPreconditionFailedError.new
+ end
+ self.version = 0
+ self.visible = true
+ save_with_history!