json.partial! "bounds"
-all = @nodes + @ways + @relations
-
-json.elements(all) do |obj|
- json.partial! obj
+json.elements do
+ json.array! @nodes, :partial => "/api/nodes/node", :as => :node
+ json.array! @ways, :partial => "/api/ways/way", :as => :way
+ json.array! @relations, :partial => "/api/relations/relation", :as => :relation
end
json.partial! "api/root_attributes"
-json.elements(@nodes) do |node|
- json.partial! node
+json.elements do
+ json.array! @nodes, :partial => "node", :as => :node
end
json.partial! "api/root_attributes"
-json.elements([@node]) do |node|
- json.partial! node
+json.elements do
+ json.array! [@node], :partial => "node", :as => :node
end
json.partial! "api/root_attributes"
-json.elements(@elems) do |old_node|
- json.partial! old_node
+json.elements do
+ json.array! @elems, :partial => "old_node", :as => :old_node
end
json.partial! "api/root_attributes"
-json.elements([@old_element]) do |old_node|
- json.partial! old_node
+json.elements do
+ json.array! [@old_element], :partial => "old_node", :as => :old_node
end
json.partial! "api/root_attributes"
-json.elements(@elems) do |old_relation|
- json.partial! old_relation
+json.elements do
+ json.array! @elems, :partial => "old_relation", :as => :old_relation
end
json.partial! "api/root_attributes"
-json.elements([@old_element]) do |old_relation|
- json.partial! old_relation
+json.elements do
+ json.array! [@old_element], :partial => "old_relation", :as => :old_relation
end
json.partial! "api/root_attributes"
-json.elements(@elems) do |old_way|
- json.partial! old_way
+json.elements do
+ json.array! @elems, :partial => "old_way", :as => :old_way
end
json.partial! "api/root_attributes"
-json.elements([@old_element]) do |old_way|
- json.partial! old_way
+json.elements do
+ json.array! [@old_element], :partial => "old_way", :as => :old_way
end
json.partial! "api/root_attributes"
-all = @nodes + @ways + @relations
-
-json.elements(all) do |obj|
- json.partial! obj
+json.elements do
+ json.array! @nodes, :partial => "/api/nodes/node", :as => :node
+ json.array! @ways, :partial => "/api/ways/way", :as => :way
+ json.array! @relations, :partial => "/api/relations/relation", :as => :relation
end
json.partial! "api/root_attributes"
-json.elements(@relations) do |relation|
- json.partial! relation
+json.elements do
+ json.array! @relations, :partial => "relation", :as => :relation
end
json.partial! "api/root_attributes"
-json.elements(@relations) do |relation|
- json.partial! relation
+json.elements do
+ json.array! @relations, :partial => "relation", :as => :relation
end
json.partial! "api/root_attributes"
-json.elements(@relations) do |relation|
- json.partial! relation
+json.elements do
+ json.array! @relations, :partial => "relation", :as => :relation
end
json.partial! "api/root_attributes"
-json.elements(@relations) do |relation|
- json.partial! relation
+json.elements do
+ json.array! @relations, :partial => "relation", :as => :relation
end
json.partial! "api/root_attributes"
-json.elements([@relation]) do |relation|
- json.partial! relation
+json.elements do
+ json.array! [@relation], :partial => "relation", :as => :relation
end
json.partial! "api/root_attributes"
-all = @nodes + [@way]
-
-json.elements(all) do |obj|
- json.partial! obj
+json.elements do
+ json.array! @nodes, :partial => "/api/nodes/node", :as => :node
+ json.array! [@way], :partial => "/api/ways/way", :as => :way
end
json.partial! "api/root_attributes"
-json.elements(@ways) do |way|
- json.partial! way
+json.elements do
+ json.array! @ways, :partial => "way", :as => :way
end
json.partial! "api/root_attributes"
-json.elements([@way]) do |way|
- json.partial! way
+json.elements do
+ json.array! [@way], :partial => "way", :as => :way
end
json.partial! "api/root_attributes"
-json.elements(@ways) do |way|
- json.partial! way
+json.elements do
+ json.array! @ways, :partial => "way", :as => :way
end