aboutsummaryrefslogtreecommitdiffstats
path: root/lib/active_text/attachment.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/active_text/attachment.rb')
-rw-r--r--lib/active_text/attachment.rb6
1 files changed, 5 insertions, 1 deletions
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