0

Before I used <% = truncate (@article.content,: length => 100)%> to truncate the content and it worked.

Now I use TinyMCE I tried <% = truncate (@article.content.html_safe,: length => 100)%> but the contents are not truncated.

Guillaume
  • 1,437
  • 2
  • 15
  • 17

1 Answers1

1

You can try this solution <%= truncate(strip_tags(@article.content.html_safe),: length => 100)%>