diff --git a/app/views/active_storage/blobs/_blob.html.erb b/app/views/active_storage/blobs/_blob.html.erb new file mode 100644 index 0000000000..2b17745c8d --- /dev/null +++ b/app/views/active_storage/blobs/_blob.html.erb @@ -0,0 +1,7 @@ +

Engine blob/_blob:

+ +<%= debug blob %> + +
+ <%= image_tag rails_blob_path(blob) %> +
diff --git a/lib/active_text/attachment.rb b/lib/active_text/attachment.rb index 870390f63e..e349c721b2 100644 --- a/lib/active_text/attachment.rb +++ b/lib/active_text/attachment.rb @@ -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 diff --git a/lib/active_text/content.rb b/lib/active_text/content.rb index 0154cea17e..c9546fb4c5 100644 --- a/lib/active_text/content.rb +++ b/lib/active_text/content.rb @@ -46,7 +46,7 @@ module ActiveText end def to_html - fragment.to_html + render_attachments(&:to_html).to_html end def to_s