diff options
author | Sam Stephenson <sam@37signals.com> | 2018-02-13 15:00:14 -0600 |
---|---|---|
committer | Sam Stephenson <sam@37signals.com> | 2018-02-13 15:00:14 -0600 |
commit | d1f50a4cbe54d15a07608b20ed2fc05e8960bc1d (patch) | |
tree | 118aaa4741567dfbcdea8afba33e194d43fd3d33 /lib/active_text/content.rb | |
parent | 2ae84d647feac338082175f581bd1ca0c33d003a (diff) | |
download | rails-d1f50a4cbe54d15a07608b20ed2fc05e8960bc1d.tar.gz rails-d1f50a4cbe54d15a07608b20ed2fc05e8960bc1d.tar.bz2 rails-d1f50a4cbe54d15a07608b20ed2fc05e8960bc1d.zip |
Preserve the outer attachment element and fix editing
Diffstat (limited to 'lib/active_text/content.rb')
-rw-r--r-- | lib/active_text/content.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/active_text/content.rb b/lib/active_text/content.rb index c9546fb4c5..190f7d3c7b 100644 --- a/lib/active_text/content.rb +++ b/lib/active_text/content.rb @@ -46,7 +46,11 @@ module ActiveText end def to_html - render_attachments(&:to_html).to_html + render_attachments do |attachment| + attachment.node.tap do |node| + node.inner_html = ApplicationController.render(attachment) + end + end.to_html end def to_s |