truncate_html icon indicating copy to clipboard operation
truncate_html copied to clipboard

Nomethod error in rails view

Open ntomsho opened this issue 5 years ago • 1 comments

I have tried installing this gem with both bundle install and gem install and my rails app is unable to find the truncate_html method. I keep getting a nomethod error.

ntomsho avatar Feb 01 '20 02:02 ntomsho

This gem mixes the truncate_html call into your view helpers. In rails 3+, you can call it anywhere via:

ActionController::Base.helpers.truncate_html(content, length: 300)

BananaNeil avatar May 11 '21 07:05 BananaNeil