我创建了一个haml-partial,我想将其用作默认标头.渲染时,我可以选择给它一个块来替换默认内容的一部分.
render partial: "partial",capture: do # Don't really know why I tried this,Syntax error ofcourse. render partial: "partial" do # 'nil' is not an ActiveModel-compatible object. It must implement :to_partial_path. render layout: "partial" do # Works,but: render layout: "partial" # You invoked render but did not give any of :partial,:template,:inline,:file or :text option. # So,it always needs the block
还有其他我不知道的选择吗?@H_502_3@