Rxml template accidentally rendered within html layout

Hi,

I have the following in my controller:

def show
@quest = Quest.find(params[:id])
respond_to do |format|
format.html
format.xml
end
end

And in my routes:

map.resources :quests

I have two views for this action, quests/show.rhtml and
quests/show.rxml. Now what I would expect as a response to
‘/quests/1.xml’ is that Rails sends, as XML, the rendered rxml view.
What happens instead is that the rxml view is rendered inside the
default html layout! How can that be?

Ingo

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs