I am displaying recent comments on the home page of a very simple blog application I am building in Ruby on Rails. I want to limit the number of characters that are displayed fr
If you are using rails 4.2 or above then you can use truncate_words method.
rails 4.2
truncate_words
For example: "In a world where everything is awesome".truncate_words(3) Output: "In a world..."
For example: "In a world where everything is awesome".truncate_words(3)
Output: "In a world..."