Rails 4.1 html and tags chars sanitize

To remove all tags and chars like ‘nbsp;’ in rails 4.1 do that:
= sanitize(post.description).truncate(350, :separator => " ").html_safe

Поделиться с друзьями

Френдинг

 

Comments

No comments so far.

Leave a Reply

 
(will not be published)
 
 
Comment