truncate_html
truncate_html copied to clipboard
undefined method `truncate_html' for #<#<Class
Followed the instructions provided for installing this gem. But get an error message. Any idea what might be the problem?
View <%= truncate_html(micropost.body, length: 40) %>
Error Msg undefined method `truncate_html' for #<#<Class:
+1, facing the simillar issue, also tried inclusing "include TruncateHtmlHelper helper_method :truncate_html" with no success.
The gem you get when you gem install truncate_html is actually not this one, but this one: https://github.com/hgmnz/truncate_html
This gem we're looking at hasn't had a commit since 2011, I think it's abandonware.
I am searching for and reviewing html truncation options.