Simplify partial rendering

This commit is contained in:
mmd-osm 2019-06-26 22:29:18 +02:00
parent 45e7c9a32e
commit d0de9967b9
22 changed files with 24 additions and 24 deletions

View file

@ -2,7 +2,7 @@ xml.instruct!
xml.osm(OSM::API.new.xml_root_attributes) do |osm|
osm << (render(:partial => "bounds", :object => @bounds) || "")
osm << (render(:partial => "node", :collection => @nodes) || "")
osm << (render(:partial => "way", :collection => @ways) || "")
osm << (render(:partial => "relation", :collection => @relations) || "")
osm << (render(@nodes) || "")
osm << (render(@ways) || "")
osm << (render(@relations) || "")
end

View file

@ -1,5 +1,5 @@
xml.instruct!
xml.osm(OSM::API.new.xml_root_attributes) do |osm|
osm << (render(:partial => "api/map/node", :collection => @nodes) || "")
osm << (render(@nodes) || "")
end

View file

@ -1,5 +1,5 @@
xml.instruct!
xml.osm(OSM::API.new.xml_root_attributes) do |osm|
osm << (render(:partial => "api/map/node", :collection => @nodes) || "")
osm << (render(@nodes) || "")
end

View file

@ -1,5 +1,5 @@
xml.instruct!
xml.osm(OSM::API.new.xml_root_attributes) do |osm|
osm << (render(:partial => "old_node", :collection => @elems) || "")
osm << (render(@elems) || "")
end

View file

@ -1,5 +1,5 @@
xml.instruct!
xml.osm(OSM::API.new.xml_root_attributes) do |osm|
osm << (render(:partial => "old_node", :collection => @elems) || "")
osm << (render(@elems) || "")
end

View file

@ -1,5 +1,5 @@
xml.instruct!
xml.osm(OSM::API.new.xml_root_attributes) do |osm|
osm << (render(:partial => "old_relation", :collection => @elems) || "")
osm << (render(@elems) || "")
end

View file

@ -1,5 +1,5 @@
xml.instruct!
xml.osm(OSM::API.new.xml_root_attributes) do |osm|
osm << (render(:partial => "old_relation", :collection => @elems) || "")
osm << (render(@elems) || "")
end

View file

@ -1,5 +1,5 @@
xml.instruct!
xml.osm(OSM::API.new.xml_root_attributes) do |osm|
osm << (render(:partial => "old_way", :collection => @elems) || "")
osm << (render(@elems) || "")
end

View file

@ -1,5 +1,5 @@
xml.instruct!
xml.osm(OSM::API.new.xml_root_attributes) do |osm|
osm << (render(:partial => "old_way", :collection => @elems) || "")
osm << (render(@elems) || "")
end

View file

@ -1,7 +1,7 @@
xml.instruct!
xml.osm(OSM::API.new.xml_root_attributes) do |osm|
osm << (render(:partial => "api/map/node", :collection => @nodes) || "")
osm << (render(:partial => "api/map/way", :collection => @ways) || "")
osm << (render(:partial => "api/map/relation", :collection => @relations) || "")
osm << (render(@nodes) || "")
osm << (render(@ways) || "")
osm << (render(@relations) || "")
end

View file

@ -1,5 +1,5 @@
xml.instruct!
xml.osm(OSM::API.new.xml_root_attributes) do |osm|
osm << (render(:partial => "api/map/relation", :collection => @relations) || "")
osm << (render(@relations) || "")
end

View file

@ -1,5 +1,5 @@
xml.instruct!
xml.osm(OSM::API.new.xml_root_attributes) do |osm|
osm << (render(:partial => "api/map/relation", :collection => @relations) || "")
osm << (render(@relations) || "")
end

View file

@ -1,5 +1,5 @@
xml.instruct!
xml.osm(OSM::API.new.xml_root_attributes) do |osm|
osm << (render(:partial => "api/map/relation", :collection => @relations) || "")
osm << (render(@relations) || "")
end

View file

@ -1,5 +1,5 @@
xml.instruct!
xml.osm(OSM::API.new.xml_root_attributes) do |osm|
osm << (render(:partial => "api/map/relation", :collection => @relations) || "")
osm << (render(@relations) || "")
end

View file

@ -1,5 +1,5 @@
xml.instruct!
xml.osm(OSM::API.new.xml_root_attributes) do |osm|
osm << (render(:partial => "api/map/relation", :collection => @relations) || "")
osm << (render(@relations) || "")
end

View file

@ -1,6 +1,6 @@
xml.instruct!
xml.osm(OSM::API.new.xml_root_attributes) do |osm|
osm << (render(:partial => "api/map/node", :collection => @nodes) || "")
osm << (render(:partial => "api/map/way", :collection => @ways) || "")
osm << (render(@nodes) || "")
osm << (render(@ways) || "")
end

View file

@ -1,5 +1,5 @@
xml.instruct!
xml.osm(OSM::API.new.xml_root_attributes) do |osm|
osm << (render(:partial => "api/map/way", :collection => @ways) || "")
osm << (render(@ways) || "")
end

View file

@ -1,5 +1,5 @@
xml.instruct!
xml.osm(OSM::API.new.xml_root_attributes) do |osm|
osm << (render(:partial => "api/map/way", :collection => @ways) || "")
osm << (render(@ways) || "")
end

View file

@ -1,5 +1,5 @@
xml.instruct!
xml.osm(OSM::API.new.xml_root_attributes) do |osm|
osm << (render(:partial => "api/map/way", :collection => @ways) || "")
osm << (render(@ways) || "")
end