开发者

Partials grouped in sub-folder

开发者 https://www.devze.com 2023-03-24 02:57 出处:网络
I have a view that relies on several partials. In wanting to group these partials, I moved them into a sub-folder but when I call the partial I get a Missing template client_demographics/_age.erb in v

I have a view that relies on several partials. In wanting to group these partials, I moved them into a sub-folder but when I call the partial I get a Missing template client_demographics/_age.erb in view path app/views error.

My partials folder structure:

app
  views
    reports
      client_demographics
        _age.html.haml
        _gender.html.开发者_如何转开发haml
      client_demographics.html.haml

How I am calling the partial in my view:

= render :partial => "client_demographics/age"


You will need to use the path from the app/views folder

= render :partial => "reports/client_demographics/age"
0

精彩评论

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