如何使article.content
過濾方式:textile?在Haml過濾器中包含變量的內容
- @articles.each do |article|
%article.post
%header=article.name
%p
:textile
=article.content
%footer
輸出
<article class="post">
<header>game</header>
<p>
</p><p>=article.content</p>
<p></p>
<footer></footer>
</article>
@wizztjh我的回答錯了;請參閱上面的更新示例,以顯示它應該「只是工作」,只要你喜歡。 – Phrogz 2011-04-06 15:56:58