I need to turn HTML into plain text. There\'s a nice function that does that in ActionView\'s SanitizeHelper, but I have trouble understanding how I can reference it and use
With this example:
"<p>example</p>"
This helped me:
ActionView::Base.full_sanitizer.sanitize(Nokogiri::HTML(example).text)
Output:
example