]> git.openstreetmap.org Git - rails.git/commitdiff
Notes: avoid calling json.partial! in loop
authormmd-osm <mmd.osm@gmail.com>
Sun, 4 Aug 2024 19:49:38 +0000 (21:49 +0200)
committermmd-osm <mmd.osm@gmail.com>
Sun, 4 Aug 2024 20:37:18 +0000 (22:37 +0200)
app/views/api/notes/index.json.jbuilder

index 7909391f5ae939f231121b01c958134ad0afce72..5660a8ad5038b0006b0b0f2fd6abd7709d06cbfc 100644 (file)
@@ -1,5 +1,5 @@
 json.type "FeatureCollection"
 
-json.features(@notes) do |note|
-  json.partial! note
+json.features do
+  json.array! @notes, :partial => "note", :as => :note
 end