truncate textilizable
This commit is contained in:
parent
9fa9aa0fb8
commit
e2447b4c88
|
@ -1400,6 +1400,6 @@ module ApplicationHelper
|
|||
#end
|
||||
#author : nyan
|
||||
def stringCut240(str)
|
||||
(str.length > 240) ? (str[0,240]<<"\n......") : str
|
||||
(str.length > 240) ? (str[0,240]<<"......") : str
|
||||
end
|
||||
end
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
<td colspan="2" width="580px" >
|
||||
<p class="font_description">
|
||||
<!-- modify by nyan -->
|
||||
<%= textilizable( stringCut240(e.event_description) ) %>
|
||||
<%= textilizable( truncate(e.event_description, length: 240 ) %>
|
||||
</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
Loading…
Reference in New Issue