Forcing partial type to rxml but Rails still looks for erb


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

render :partial => “post”, :type => “rxml”


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 =>

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs