Preserve the outer attachment element and fix editing
This commit is contained in:
parent
2ae84d647f
commit
d1f50a4cbe
|
@ -74,12 +74,8 @@ module ActiveText
|
|||
end
|
||||
|
||||
def to_html
|
||||
if attachable.respond_to?(:to_partial_path)
|
||||
ApplicationController.render(self)
|
||||
else
|
||||
HtmlConversion.node_to_html(node)
|
||||
end
|
||||
end
|
||||
|
||||
def to_s
|
||||
to_html
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue