HAML部分 - 错误呈现部分

时间:2012-04-24 20:49:00

标签: ruby-on-rails ruby haml partials

我有这行代码:

  = render :partial => "views/influencers/disclosures/shared/list"

我收到此错误:

Missing partial views/influencers/disclosures/shared/list with {:locale=>[:en, :en], :handlers=>[:haml, :erb, :builder], :formats=>[:html]}. Searched in:

我尝试渲染的部分位于此目录中:

app/views/influencers/disclosures/shared/_list.html.haml

我试图从位于此处的文件中调用此部分:

app/views/mobile/disclosures/index.html.haml

任何想法为什么它不会被识别以及为什么会发生这种错误?

谢谢!

1 个答案:

答案 0 :(得分:2)

替换为:

= render :partial => "/influencers/disclosures/shared/list"