Frequently used Active Support Methods in Ruby on Rails — Part 2

Gokul
2 min readJan 30, 2021

truncate_words

The method truncate_words returns a given text after a given number of words. Here is the example for the truncate_words with word count argument.

'Once upon a time in a world far far away'.truncate_words(4)

--

--

Gokul

Consultant | Freelancer | Ruby on Rails | ReactJS