Why is respond_to always rending the RXML view?

I'm having a problem in Rails 2 where respond_to is always rendering the RXML view even in the HTML rendering response. Can anyone tell me why this might be happening? Here's a code snippet:

respond_to do |accepts|   accepts.html   accepts.xml { render :action => 'show.rxml', :layout => false} end

If I change this to the following it works fine:

respond_to do |accepts|   accepts.html { render :action => 'show.rhtml', :layout => true }   accepts.xml { render :action => 'show.rxml', :layout => false } end

Here's my setup:

rails (2.0.2) mongrel (1.1.4) mongrel_cluster (1.0.5) apache (2.2.6)

Thanks in advance!

- Jason

The only idea I have is that maybe you don’t need to use render :action. Instead, maybe you should be getting some XML from somewhere (such as calling #to_xml on a model or collection) and rendering it like this?

respond_to do |accepts|


accepts.xml { render :xml => some_model.to_xml }


See also: http://www.railsbrain.com/api/rails-2.0.2/doc/index.html?a=M000211&name=respond_to