开发者

How do I render RedCloth html in a view in Rails3?

In rails 2, I use <%=h %> to display HTML-generated by RedCloth, but how do I do that in Rails 3?

<%= raw RedCloth.new(@review).to开发者_高级运维_html %>


Use <%= raw %>.

Reference: raw vs. html_safe vs. h to unescape html

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜