From 6f2e3e9508b6a51062f547e3630cf1c7ad2639c1 Mon Sep 17 00:00:00 2001 From: Andy Allan Date: Wed, 7 Apr 2021 16:30:08 +0100 Subject: [PATCH] Add missing root attributes to User#show and User#index json responses --- app/views/api/users/index.json.jbuilder | 2 ++ app/views/api/users/show.json.jbuilder | 2 ++ 2 files changed, 4 insertions(+) diff --git a/app/views/api/users/index.json.jbuilder b/app/views/api/users/index.json.jbuilder index efc905cfe..1ad07d47c 100644 --- a/app/views/api/users/index.json.jbuilder +++ b/app/views/api/users/index.json.jbuilder @@ -1,3 +1,5 @@ +json.partial! "api/root_attributes" + json.users(@users) do |user| json.partial! user end diff --git a/app/views/api/users/show.json.jbuilder b/app/views/api/users/show.json.jbuilder index 51a85380c..b3a86a892 100644 --- a/app/views/api/users/show.json.jbuilder +++ b/app/views/api/users/show.json.jbuilder @@ -1 +1,3 @@ +json.partial! "api/root_attributes" + json.partial! @user -- 2.39.5