From: mmd-osm Date: Wed, 26 Jun 2019 19:34:40 +0000 (+0200) Subject: Avoid using @variables in partials X-Git-Tag: live~2522^2~8 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/45e7c9a32e08446fd087580d84b2e11eadc1683d?hp=363155a2a86796d27ee9161f1ee9b74d6fa307e5 Avoid using @variables in partials --- diff --git a/app/views/api/map/_bounds.xml.builder b/app/views/api/map/_bounds.xml.builder index 85cca01f9..8a38e21ea 100644 --- a/app/views/api/map/_bounds.xml.builder +++ b/app/views/api/map/_bounds.xml.builder @@ -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) diff --git a/app/views/api/map/index.xml.builder b/app/views/api/map/index.xml.builder index bd70f20bd..841ea8384 100644 --- a/app/views/api/map/index.xml.builder +++ b/app/views/api/map/index.xml.builder @@ -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) || "")