#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

@ -20,7 +20,7 @@ class ContextsController < ApplicationController
respond_to do |format|
format.html &render_contexts_html
format.m &render_contexts_mobile
format.xml { render :xml => @all_contexts.to_xml( :except => :user_id ) }
format.xml { render :xml => @all_contexts.to_xml(:root => :contexts, :except => :user_id) }
format.any(:rss, :atom) do
@feed_title = 'Tracks Contexts'
@feed_description = "Lists all the contexts for #{current_user.display_name}"
@ -57,7 +57,7 @@ class ContextsController < ApplicationController
respond_to do |format|
format.html
format.m &render_context_mobile
format.xml { render :xml => @context.to_xml( :except => :user_id ) }
format.xml { render :xml => @context.to_xml(:root => :context, :except => :user_id) }
end
else
respond_to do |format|