Preserve the outer attachment element and fix editing

This commit is contained in:
Sam Stephenson 2018-02-13 15:00:14 -06:00
parent 2ae84d647f
commit d1f50a4cbe
2 changed files with 6 additions and 6 deletions

View File

@ -74,11 +74,7 @@ module ActiveText
end
def to_html
if attachable.respond_to?(:to_partial_path)
ApplicationController.render(self)
else
HtmlConversion.node_to_html(node)
end
HtmlConversion.node_to_html(node)
end
def to_s

View File

@ -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