我试图做一些可重复使用的帮手插入一些描述的页面与内容标签嵌套content_tags只显示最后chilldren轨视图助手
def spec_description(name, overview, detail)
content_tag :dl do
content_tag :dt do
content_tag(:strong, name)
end
content_tag :dd, overview, :class => "spec-overview"
content_tag :dd, detail, :class => "spec-detail" #only this dd tag gets output
end
end
但因为它是,只有有什么是“细节” DD标签获取输出到HTML
修订 输出HTML是现在这个样子:
<dl>
<dd>some detail from detail variable</dd>
</dl>
如何看“概述”和“名称”dd标签完全丢失?别说他们的内容...
有没有人有一个想法,为什么这是,我怎么可以解决它?
没有其实,dl出来,dt甚至没有。而第一个dd,概述之一,也不存在。 bizzare ..我更新了问题 –