开发者

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

开发者 https://www.devze.com 2023-02-28 04:16 出处:网络
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 %>

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

精彩评论

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