In my rails app I have a “Post” model, in the index page I’m showing all of my posts as “squares” with the title and a small excerpt. The size of each “square” is 250px wide.
Since some of the titles are longer than 250px, I want to be able to “restrict” the number of characters that are going to be shown in title on my “posts” index page.
Instead of “Frozen Dried Strawberry” have something like “Frozen Dried Stra..”
http://api.rubyonrails.org/classes/ActionView/Helpers/TextHelper.html#method-i-truncate