Strip HTML tags in Rails Views
Rails ActionView::Helpers::SanitizeHelper includes a super handy method strip_tags
that removes html tags from a string.
strip_tags("<p>Hello World Paragraph</p>")
#=> Hello World Paragraph
strip_tags("<a href=https://google.com>Cool Link!</a>")
#=> Cool Link!
Read more about it here
Tweet