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

index 1ad07d47cd2639cc63d49ae093b9785478a5868b..d2dbd4d4f5c6113fd03a381e779215dabe3e58c4 100644 (file)
@@ -1,5 +1,5 @@
 json.partial! "api/root_attributes"
 
-json.users(@users) do |user|
-  json.partial! user
+json.users do
+  json.array! @users, :partial => "user", :as => :user
 end