Hi ! Is this expected to work: xml.instruct!(:xml, :encoding => 'ISO-8859-1') xml.contacts do render :partial => 'contact_xml', :collection => @contacts end Considering that contact_xml is a partial named '_contact_xml.rxml' ? I get an empty contacts element in the resulting document, and the @contacts array sure does contain two elements. Thanks ! -- François Beausoleil http://blog.teksol.info/ _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Hi Francois, On 11/29/05, Francois Beausoleil <francois.beausoleil-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi ! > > Is this expected to work: > xml.instruct!(:xml, :encoding => ''ISO-8859-1'') > xml.contacts do > render :partial => ''contact_xml'', :collection => @contacts > end > > Considering that contact_xml is a partial named ''_contact_xml.rxml'' ? > I get an empty contacts element in the resulting document, and the > @contacts array sure does contain two elements.Try: xml.contacts do xml << render :partial => ... end -- sam
Francois Beausoleil
2005-Dec-02 07:50 UTC
Re: render :partial, :collection in RXML templates
Hello Sam ! 2005/11/29, Sam Stephenson <sstephenson@gmail.com>:> Try: > xml.contacts do > xml << render :partial => ... > endSorry for the late reply. Works like a charm ! Thanks ! -- François Beausoleil http://blog.teksol.info/ _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails