Method: ActionText::Content#to_s
- Defined in:
- actiontext/lib/action_text/content.rb
#to_s ⇒ Object
Safely transforms Content into an HTML String.
content = ActionText::Content.new(content: "<h1>Funny times!</h1>")
content.to_s # => "<h1>Funny times!</h1>"
content = ActionText::Content.new("<div onclick='action()'>safe<script>unsafe</script></div>")
content.to_s # => "<div>safeunsafe</div>"
157 158 159 |
# File 'actiontext/lib/action_text/content.rb', line 157 def to_s to_rendered_html_with_layout end |