This project is archived and is in readonly mode.

#2042 ✓resolved
hmans

Simplified render breaks with nested models (partials)

Reported by hmans | February 22nd, 2009 @ 04:44 PM

I have a namespaced resource, the model for which is Quiz::Question. In a view, I use the (awesome) new render syntax to render a question's partial (from app/views/quiz/questions/show.html.erb):


<%= render @question %>

Expecting this to resolve to app/views/quiz/questions/_question.html.erb. However, I'm getting the following error message:


Missing template quiz/quiz/questions/_question.erb in view path app/views

(Note the duplicate "quiz"!)

When I replace the call with the old-style render syntax, everything works fine (of course):


<%= render :partial => "quiz/questions/question", :object => @question %>

But obviously it'd be nicer to have the cool new render magic work. :-)

This is with current Edge Rails, revision ff1afbd65098643a06eef928f92fecf6e9d548b2.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Referenced by

Pages