Initial Attachment rendering support
This commit is contained in:
parent
b79bf62196
commit
2ae84d647f
|
@ -0,0 +1,7 @@
|
|||
<h2>Engine <code>blob/_blob</code>:</h2>
|
||||
|
||||
<%= debug blob %>
|
||||
|
||||
<figure>
|
||||
<%= image_tag rails_blob_path(blob) %>
|
||||
</figure>
|
|
@ -74,7 +74,11 @@ module ActiveText
|
|||
end
|
||||
|
||||
def to_html
|
||||
HtmlConversion.node_to_html(node)
|
||||
if attachable.respond_to?(:to_partial_path)
|
||||
ApplicationController.render(self)
|
||||
else
|
||||
HtmlConversion.node_to_html(node)
|
||||
end
|
||||
end
|
||||
|
||||
def to_s
|
||||
|
|
|
@ -46,7 +46,7 @@ module ActiveText
|
|||
end
|
||||
|
||||
def to_html
|
||||
fragment.to_html
|
||||
render_attachments(&:to_html).to_html
|
||||
end
|
||||
|
||||
def to_s
|
||||
|
|
Loading…
Reference in New Issue