From: mmd-osm Date: Sun, 4 Aug 2024 19:49:38 +0000 (+0200) Subject: Notes: avoid calling json.partial! in loop X-Git-Tag: live~699^2~1 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/341ff0a06b86dac7af0d3028bfa25fe609c18cff Notes: avoid calling json.partial! in loop --- diff --git a/app/views/api/notes/index.json.jbuilder b/app/views/api/notes/index.json.jbuilder index 7909391f5..5660a8ad5 100644 --- a/app/views/api/notes/index.json.jbuilder +++ b/app/views/api/notes/index.json.jbuilder @@ -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