aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorJavan Makhmali <javan@javan.us>2018-10-06 12:11:10 -0400
committerJavan Makhmali <javan@javan.us>2018-10-06 12:11:10 -0400
commitba97db849cd34a83c05234572d3d7261864c1782 (patch)
treeb6d6e978dd80368291379d26de26b8f659b15fbe /app
parent33f940f1407870f451e19c479f816edaf9ab0c1e (diff)
downloadrails-ba97db849cd34a83c05234572d3d7261864c1782.tar.gz
rails-ba97db849cd34a83c05234572d3d7261864c1782.tar.bz2
rails-ba97db849cd34a83c05234572d3d7261864c1782.zip
Add template for ActionText::Attachables::RemoteImage
Fixes #15
Diffstat (limited to 'app')
-rw-r--r--app/views/action_text/attachables/_remote_image.html.erb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/views/action_text/attachables/_remote_image.html.erb b/app/views/action_text/attachables/_remote_image.html.erb
new file mode 100644
index 0000000000..3372f8d940
--- /dev/null
+++ b/app/views/action_text/attachables/_remote_image.html.erb
@@ -0,0 +1,8 @@
+<figure class="attachment attachment--preview">
+ <%= image_tag(remote_image.url, width: remote_image.width, height: remote_image.height) %>
+ <% if caption = remote_image.try(:caption) %>
+ <figcaption class="attachment__caption">
+ <%= caption %>
+ </figcaption>
+ <% end %>
+</figure>