]> git.openstreetmap.org Git - rails.git/commitdiff
Changesets: avoid calling json.partial! in loop
authormmd-osm <mmd.osm@gmail.com>
Sun, 4 Aug 2024 19:48:09 +0000 (21:48 +0200)
committermmd-osm <mmd.osm@gmail.com>
Sun, 4 Aug 2024 19:48:09 +0000 (21:48 +0200)
app/views/api/changesets/index.json.jbuilder

index f52d69865d9d2f63f3205641f9d5c028e52b1e5c..ce094fa3457ef5fb21093f6eba365c4fda5fb5cb 100644 (file)
@@ -1,5 +1,5 @@
 json.partial! "api/root_attributes"
 
-json.changesets(@changesets) do |changeset|
-  json.partial! changeset
+json.changesets do
+  json.array! @changesets, :partial => "changeset", :as => :changeset
 end