method
to_plain_text
v7.1.3.2 -
Show latest stable
- Class:
ActionText::RichText
to_plain_text()public
Returns the body attribute as plain text with all HTML tags removed.
message = Message.create!(content: "<h1>Funny times!</h1>") message.content.to_plain_text # => "Funny times!"