]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/api/old_relations/history.json.jbuilder
Jbuilder: render collections of partials
[rails.git] / app / views / api / old_relations / history.json.jbuilder
index 311a80a86f04af717dfc472cdcc5adcbcd5d7879..944bed023512dfd3886120213ccba3e08935fb0d 100644 (file)
@@ -1,5 +1,5 @@
 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