From 9e5ab1ebd9a80a78f9daaf38a9ee244e60b8af1c Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Tue, 5 Jun 2018 16:37:50 +0200 Subject: By default, coercing to a string should produce a formatted output MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Open to other ways of doing this, but didn’t want to require embedding the trix-content class inside the actual HTML that Trix persists. So this seemed like a reasonable alternative. Thoughts @javan or @sstephenson? --- lib/action_text/content.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/action_text') diff --git a/lib/action_text/content.rb b/lib/action_text/content.rb index c63e0c3525..ce40505329 100644 --- a/lib/action_text/content.rb +++ b/lib/action_text/content.rb @@ -54,7 +54,7 @@ module ActionText end def to_s - to_html.html_safe + "
#{to_html}
".html_safe end def as_json(*) -- cgit v1.2.3