method
to_plain_text
rails latest stable - Class:
ActionText::Content
to_plain_text()public
Returns the content as plain text with all HTML tags removed.
content = ActionText::Content.new("<h1>Funny times!</h1>") content.to_plain_text # => "Funny times!"