projects
/
rails.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
604f9dd
)
add to_xml method for oldnode
author
Christopher Schmidt
<crschmidt@crschmidt.net>
Sun, 11 May 2008 22:26:46 +0000
(22:26 +0000)
committer
Christopher Schmidt
<crschmidt@crschmidt.net>
Sun, 11 May 2008 22:26:46 +0000
(22:26 +0000)
app/models/old_node.rb
patch
|
blob
|
history
diff --git
a/app/models/old_node.rb
b/app/models/old_node.rb
index 247a699236c46bc76a9dc0e804051a1877709042..5d9c6d7ef31d7c8ecf57d738b92ea82021ff266e 100644
(file)
--- a/
app/models/old_node.rb
+++ b/
app/models/old_node.rb
@@
-1,4
+1,5
@@
class OldNode < GeoRecord
+ set_primary_keys :id, :version
set_table_name 'nodes'
validates_presence_of :user_id, :timestamp
@@
-30,6
+31,12
@@
class OldNode < GeoRecord
old_node.version = node.version
return old_node
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 'node'