From 45e7c9a32e08446fd087580d84b2e11eadc1683d Mon Sep 17 00:00:00 2001 From: mmd-osm Date: Wed, 26 Jun 2019 21:34:40 +0200 Subject: [PATCH 1/1] Avoid using @variables in partials --- app/views/api/map/_bounds.xml.builder | 8 ++++---- app/views/api/map/index.xml.builder | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) 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) || "") -- 2.43.2