Avoid using @variables in partials

This commit is contained in:
mmd-osm 2019-06-26 21:34:40 +02:00
parent 363155a2a8
commit 45e7c9a32e
2 changed files with 5 additions and 5 deletions

View file

@ -1,8 +1,8 @@
attrs = {
"minlat" => format("%.7f", @bounds.min_lat),
"minlon" => format("%.7f", @bounds.min_lon),
"maxlat" => format("%.7f", @bounds.max_lat),
"maxlon" => format("%.7f", @bounds.max_lon)
"minlat" => format("%.7f", bounds.min_lat),
"minlon" => format("%.7f", bounds.min_lon),
"maxlat" => format("%.7f", bounds.max_lat),
"maxlon" => format("%.7f", bounds.max_lon)
}
xml.bounds(attrs)

View file

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