From 341ff0a06b86dac7af0d3028bfa25fe609c18cff Mon Sep 17 00:00:00 2001 From: mmd-osm Date: Sun, 4 Aug 2024 21:49:38 +0200 Subject: [PATCH] Notes: avoid calling json.partial! in loop --- app/views/api/notes/index.json.jbuilder | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 2.39.5