# Forcing partial type to rxml but Rails still looks for erb

**URL:** <https://www.ruby-forum.com/t/forcing-partial-type-to-rxml-but-rails-still-looks-for-erb/187391>\
**Category:** Rails\
**Created:** [April 22, 2010, 2:02pm UTC](https://www.ruby-forum.com/t/forcing-partial-type-to-rxml-but-rails-still-looks-for-erb/187391 "2010-04-22T14:02:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![fipa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/9e8a1a/32.png) [@fipa](https://www.ruby-forum.com/u/fipa)\
**Post date:** [April 22, 2010, 2:02pm UTC](https://www.ruby-forum.com/t/forcing-partial-type-to-rxml-but-rails-still-looks-for-erb/187391/1 "2010-04-22T14:02:50Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![fipa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/9e8a1a/32.png) [@fipa](https://www.ruby-forum.com/u/fipa)\
**Post date:** [April 22, 2010, 2:09pm UTC](https://www.ruby-forum.com/t/forcing-partial-type-to-rxml-but-rails-still-looks-for-erb/187391/2 "2010-04-22T14:09:20Z")

</div>

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)
