增加方法判断:将/n转还成<br/>
This commit is contained in:
parent
159d8f644e
commit
b981c4d07b
|
@ -2343,4 +2343,8 @@ module ApplicationHelper
|
|||
end
|
||||
end
|
||||
|
||||
#将文本内的/n转换为<br>
|
||||
def text_format text
|
||||
text.gsub("\n","<br/>").html_safe
|
||||
end
|
||||
end
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
编程代码:
|
||||
</span>
|
||||
<div class="show_hwork_p break_word">
|
||||
<%= textilizable @work.description%>
|
||||
<%= text_format @work.description%>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
<li >
|
||||
<span class="tit_fb ">内容:</span>
|
||||
<div class="show_hwork_p break_word">
|
||||
<%= textilizable @work.description%>
|
||||
<%= text_format @work.description%>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
|
|
Loading…
Reference in New Issue