Thanks dudes... I'll play with it more tomorrow.

On 8/7/06, Kevin Clark <[EMAIL PROTECTED]> wrote:
respond_to do |wants|
  wants.xml { render :template => 'my_template.rxml', :layout => false }
end

Does that work? If not, write up a test case and post to the core list.

Kev

On 8/7/06, Chris Van Pelt <[EMAIL PROTECTED]> wrote:
> So I'm playing with respond_to today, and I got really angry...
>
> There are a ton of examples using the "wants.xml { render :xml =>
> @whatever.to_xml }", but I need to have it actually render an rxml
> template...   The problem is, it renders a layout by default.  The
> kicker is, when I do something like this...
>
>    respond_to do |wants|
>       wants.xml { render :layout => false }
>       wants.html
>     end
>
> it renders the HTML template without a layout.  The only way I was
> able to get it to work was to do this...
>
>    respond_to do |wants|
>       wants.xml { render :file => 'general/sitemap.rxml', :layout =>
> false, :use_full_path => true }
>       wants.html
>     end
>
> Does anyone have a better idea of how to de-hack this S?
>
> Been a long day,
>
> Chris
> _______________________________________________
> Sdruby mailing list
> Sdruby@lists.sdruby.com
> http://lists.sdruby.com/mailman/listinfo/sdruby
>


--
Kevin Clark
http://glu.ttono.us
_______________________________________________
Sdruby mailing list
Sdruby@lists.sdruby.com
http://lists.sdruby.com/mailman/listinfo/sdruby

_______________________________________________
Sdruby mailing list
Sdruby@lists.sdruby.com
http://lists.sdruby.com/mailman/listinfo/sdruby

Reply via email to