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