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: - <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> - <head> <meta http-equiv="content-type" content="text/html;charset=UTF-8" /> <title>Sdrs: index</title> </head> - <body> <p style="color: green" /> <?xml version="1.0" encoding="UTF-8" ?> - <sdrs> - <sdr> <miliseg_ini>693710000</miliseg_ini> <miliseg_fin>62238000</miliseg_fin> </sdr> </sdrs> </body> </html> How can I say that I just want the xml output? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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 Fuentes <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> 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: > - <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> > - �<head> > � � <meta http-equiv="content-type" content="text/html;charset=UTF-8" /> > � � <title>Sdrs: index</title> > � �</head> > - <body> > � �<p style="color: green" /> > > � �<?xml version="1.0" encoding="UTF-8" ?> > - �<sdrs> > - � <sdr> > � � �<miliseg_ini>693710000</miliseg_ini> > � � �<miliseg_fin>62238000</miliseg_fin> > � � </sdr> > � �</sdrs> > � </body> > � </html> > > How can I say that I just want the xml output? > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Damaris Fuentes
2008-Jan-06 19:47 UTC
Re: Trying to remove HTML layout from RXML templates
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 Fuentes <rails-mailing-l...@andreas-s.net>-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---