Trying to remove HTML layout from RXML templates

Hi you all,

I have a simple REST app with a controller method like this:
def index
@sdrs = Sdr.find(:all)
respond_to do |format|
format.html
format.xml
end
end

The rxml is well constructed, however, what I get when the request is
through XML is the xml information surrounded by the layout of the app,
something like:

  • Sdrs: index
  • <?xml version="1.0" encoding="UTF-8" ?>

  • 693710000 62238000

How can I say that I just want the xml output?

Either this:
layout ‘application’, :except => :create_with_ajax
or this:
http://dev.rubyonrails.org/ticket/7682 (some code is in the middle of
the page)

-Christoph

On Jan 5, 7:55�pm, Damaris F. [email protected]

Thanks!
I’ve read the ticket and I’ve used the
exempt_from_layout :rxml
in my controller.

Thanks.

Kitto wrote:

Either this:
layout ‘application’, :except => :create_with_ajax
or this:
http://dev.rubyonrails.org/ticket/7682 (some code is in the middle of
the page)

-Christoph

On Jan 5, 7:55�pm, Damaris F. [email protected]