This project is archived and is in readonly mode.

#282 ✓invalid
Petr Sodomka

render partial in views root failing to find template

Reported by Petr Sodomka | May 30th, 2008 @ 12:11 PM

Hi, I upgraded to edge rails (svn revision 9250) and found this problem. I had "menu" partial, stored inside /app/views/_menu.html.erb. I call it from another template, using this code:

<%= render :partial => "/menu" %>

It worked ok in 2.0.2, but when running it on edge rails, it fails with this message: "Couldn't find template file for _menu in ["...../app/views"]"

I found a workaround. I moved the partial template to views subfolder /app/views/newsubfolder/_menu.html.erb and call it using

<%= render :partial => "/newsubfolder/menu" %>

and then it works. But don't want it to be in subfolder.

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

Tags

Pages