Fernando Perez
2010-Apr-22 12:02 UTC
Forcing partial type to rxml but Rails still looks for erb
Hi, I am using rxml to render the response of a request and I''d like to use rxml partials to dry things out. The problem is that in the parent rxml view, Rails expects the partial to be an erb file which is incorrect. Trying the following did not work either as it still looked for an erb file render :partial => "post", :type => "rxml" Thanks -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Fernando Perez
2010-Apr-22 12:09 UTC
Re: Forcing partial type to rxml but Rails still looks for erb
Ok, I found out that that rxml is deprecated and I should use builder extension instead so that solved part of the equation. Now I''m having another problem with collection. The following does not work and in the partial I get @articles instead of a local var article. xml << render(:partial => "post", :type => :builder, :collection => @articles) -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.