render, respond_to, and rxml files

So, I need to do some custom rendering of data, mainly to filter out what is generated. I could put this in the model by overriding the to_xml for my models, but that's something of a hack to me.

I made a file called "index.rxml" in views/machines, and I've tried things like this in the machines_controller:

format.html format.xml { render :layout => false }

However, this causes it to render index.rhtml instead. So, I tried this:

format.xml { render :action => "index.rxml", :layout => false }

and this works. But it also seems like a hack: why should I have to tell render the filename, and why should I constantly have to specify :layout => false? Is there a DRY way to do this that isn't even a little bit of a hack? :slight_smile:

--Michael