In my controller, I'm building a json object for books. I want to show truncate(book.content, 250)
.
This doesn't work in a rails controller. And given it's a JSON render, I don't use a view. So how does one truncate? I don't want my JSON object to be huge :)!
Thanks.