Closed jefflunt closed 12 years ago
So, Rail's truncate helper works fine, except that I'm combining it with the simple_format helper, which inserts line breaks into the display of text.
truncate
simple_format
The problem with this is that you could enter a simple note, such as
who what where why when how
...which is six lines. The problem is, the thought box is only designed to hold five lines maximum, and so the text will overflow the div.
A smarter truncate (which truncates at either a maximum length, or maximum number of lines, whichever comes first) will be necessary to fix this.
So, Rail's
truncate
helper works fine, except that I'm combining it with thesimple_format
helper, which inserts line breaks into the display of text.The problem with this is that you could enter a simple note, such as
...which is six lines. The problem is, the thought box is only designed to hold five lines maximum, and so the text will overflow the div.
A smarter truncate (which truncates at either a maximum length, or maximum number of lines, whichever comes first) will be necessary to fix this.