2012-04-27 63 views
0

我有这个目录中的观点:Ruby on Rails的 - 错误,系统无法找到部分

app/views/mobile/dis/my_view.html.haml 

,并在其中我有简单的一行代码,以使部分:

= render "dis_content", :preview => false 

,并在同一目录下my_view.html.haml文件部分的生活,被称为_dis_content.html.haml

但由于某些原因,当我试图渲染my_view.html.haml文件,我得到这个错误:

Missing partial mobile/dis/dis_content, mobile/base/dis_content, application/dis_content with {:locale=>[:en, :en], :handlers=>[:haml, :erb, :builder] 

任何想法为什么它没有看到局部?

谢谢!

回答

1

你可以试试这个:

<%= render 'form' %> 

或其他文件夹

<%= render 'layouts/my_other_layouts'%> 
+0

嗨, <%= render'form'%>工作,但是具有这个haml:%p测试的文件可以没有出现在结果页面上。任何想法为什么不呢? – GeekedOut 2012-04-27 14:28:34

1

我想你可能需要

render :partial => "dis_content"

+0

不幸给了同样的错误 – GeekedOut 2012-04-27 14:11:52