#2036: Change empty XML responses to have the correct base element

This commit is contained in:
Jyri-Petteri Paloposki 2019-05-03 11:47:05 +03:00
parent addc3b5513
commit b9a80a385e
6 changed files with 13 additions and 13 deletions

View file

@ -17,7 +17,7 @@ class UsersController < ApplicationController
end
format.xml do
@users = User.order('login')
render :xml => @users.to_xml(:except => [ :password ])
render :xml => @users.to_xml(:root => :users, :except => [ :password ])
end
end
end
@ -25,7 +25,7 @@ class UsersController < ApplicationController
# GET /users/id GET /users/id.xml
def show
@user = User.find(params[:id])
render :xml => @user.to_xml(:except => [ :password ])
render :xml => @user.to_xml(:root => :user, :except => [ :password ])
end
# GET /users/new