Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
*这是用于测试我的应用程序*如何在 rails3 中以正确的格式显示存储在字符串变量中的 html 数据?
To prevent Rails from escaping your output, you can use
'<div>something</div>'.html_safe
or, even better (because it automatically handles nil values)
raw '<div>something</div>'