diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2018-06-27 16:20:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-27 16:20:58 +0200 |
commit | b430ba4754f59934acb4806c83d10dee5af8de9e (patch) | |
tree | 1d7482d313f05a800f63a3a490293c9593b2a6a2 /lib/action_text/content.rb | |
parent | a4af9580d604221ec36d2cd5671eb7f256ae5173 (diff) | |
parent | 60050ee41275eda25601beaa453e26841511d492 (diff) | |
download | rails-b430ba4754f59934acb4806c83d10dee5af8de9e.tar.gz rails-b430ba4754f59934acb4806c83d10dee5af8de9e.tar.bz2 rails-b430ba4754f59934acb4806c83d10dee5af8de9e.zip |
Merge pull request #1 from basecamp/separate-rich-text-record
Separate Rich Text record
Diffstat (limited to 'lib/action_text/content.rb')
-rw-r--r-- | lib/action_text/content.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/action_text/content.rb b/lib/action_text/content.rb index c63e0c3525..c296896ac4 100644 --- a/lib/action_text/content.rb +++ b/lib/action_text/content.rb @@ -53,8 +53,12 @@ module ActionText end.to_html end + def to_html_with_layout + ActionText.renderer.render(partial: "action_text/content/layout", locals: { document: to_html }) + end + def to_s - to_html.html_safe + to_html_with_layout end def as_json(*) |