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