开发者

How can I reference a partial form another folder?

/views/category/_blah.html.erb /views/users/show.html.erb

Inside of show, I wan开发者_Python百科t to render the partial _blah but I am getting an error as it cant' find it.


try using

<%= render :partial => "category/blah" %>

inside your view.

(This is definitely good coding practice, as you'll find it in the "Rendering Partial Collections" page in the first Rails Guide.)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜