using text helper in a model class


I have refactored my code and the previous function in my controller
help.truncate() doesn't seems to work anymore in my model.

My model class is generating files and I'd like to use this text helper.
How can I fix that?


If you want to use rails text helpers in your model then include the
text helper module in the model like so

include ActionView::Helpers::TextHelper