X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/2d373c6f2095e11fe8a426cbafc350eb47864868..2939aa9398694d304067a2fd409104ed53afc57d:/app/models/old_relation.rb diff --git a/app/models/old_relation.rb b/app/models/old_relation.rb index 10c76a758..b7e7248d9 100644 --- a/app/models/old_relation.rb +++ b/app/models/old_relation.rb @@ -1,4 +1,6 @@ class OldRelation < ActiveRecord::Base + include ConsistencyValidations + set_table_name 'relations' belongs_to :changeset @@ -86,6 +88,12 @@ class OldRelation < ActiveRecord::Base OldRelationTag.find(:all, :conditions => ['id = ? AND version = ?', self.id, self.version]) end + def to_xml + doc = OSM::API.new.get_xml_doc + doc.root << to_xml_node() + return doc + end + def to_xml_node el1 = XML::Node.new 'relation' el1['id'] = self.id.to_s