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~809^2~1 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/341ff0a06b86dac7af0d3028bfa25fe609c18cff?hp=14184b1b2e6d38db13497c37d8bcc07540c25f44 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