【发布时间】:2013-05-07 21:38:11
【问题描述】:
考虑这样的 partial.haml:
- haml_tag :body, {:id => @instance_var}
我要做的是在渲染的部分下嵌套haml内容。比如:
= render 'partial_file' do
%h1 My test
%p Trying to nest under a partial output.
但这会导致以下视图错误:
'nil' is not an ActiveModel-compatible object that returns a valid partial path.
有没有类似的解决方案可以做到这一点?
【问题讨论】:
标签: ruby-on-rails nested haml partial-views