Rails [已解决] 弱弱的问一句让 html 输出自动换行的方法?

jjzxcc · March 05, 2013 · Last by jjzxcc replied at March 06, 2013 · 3461 hits
<%= @message.user_email %>

输出的结果太长。请问在前面加什么方法让它在 view 显示的时候自动换行?

Email 换行不好吧

@hilbert 好吧 我表述不准确

<%= @message.user_emails %>

是多个 email 地址。

这个字符串是什么样的?

如果是浏览器显示可以用 css 控制

好吧,我找到了。

<%= word_wrap(@message.user_email) %>

多谢各位的帮助。

You need to Sign in before reply, if you don't have an account, please Sign up first.