Customized truncate helper
Customized truncate helper In Rails truncate helper will truncates a given text after a given :length if text is longer than :length (defaults to 30).The problem is that when we truncate the string by character or word, it will cutoff the text mid-word and creating open tag problems.
Comments
We are using this one : http://gist.github.com/113998 with great success :).
I’m using this one: http://pastie.textmate.org/487265
Post a comment