# Why is rendering an rxml template so hard?

**URL:** <https://www.ruby-forum.com/t/why-is-rendering-an-rxml-template-so-hard/106050>\
**Category:** Rails\
**Created:** [June 5, 2007, 11:05pm UTC](https://www.ruby-forum.com/t/why-is-rendering-an-rxml-template-so-hard/106050 "2007-06-05T23:05:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![benjohnson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/3ec8ea/32.png) [@benjohnson](https://www.ruby-forum.com/u/benjohnson)\
**Post date:** [June 5, 2007, 11:05pm UTC](https://www.ruby-forum.com/t/why-is-rendering-an-rxml-template-so-hard/106050/1 "2007-06-05T23:05:44Z")

</div>

I want to do something very simple and basic. All that I want to do is  
create an action that returns xml using an rxml template.  
exempt\_from\_layout function does not work and rendering an rxml file  
uses a layout for some reason.

Any ideas?

---

<div class="post-metadata">

**Author:** ![benjohnson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/3ec8ea/32.png) [@benjohnson](https://www.ruby-forum.com/u/benjohnson)\
**Post date:** [June 5, 2007, 11:38pm UTC](https://www.ruby-forum.com/t/why-is-rendering-an-rxml-template-so-hard/106050/2 "2007-06-05T23:38:18Z")

</div>

> I want to do something very simple and basic. All that I want to do is  
> create an action that returns xml using an rxml template.  
> exempt\_from\_layout function does not work and rendering an rxml file  
> uses a layout for some reason.

At the end of your action method put:

render :layout =\> false

That should do it.
