<%= message.content %>
I can display a message like this, but in some situations I would like to display only the first 5 words of the st
In rails 4.2 you can use truncate_words.
4.2
'Once upon a time in a world far far away'.truncate_words(4) => "Once upon a time..."