From c1e949e9e618f75dc446ffa584c3b441c48714b1 Mon Sep 17 00:00:00 2001 From: George Claghorn Date: Thu, 24 Jan 2019 11:46:42 -0500 Subject: Prefer ImageProcessing's resize_to_limit macro over resize_to_fit Don't upsize images smaller than the specified dimensions. --- actiontext/app/views/active_storage/blobs/_blob.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actiontext/app') diff --git a/actiontext/app/views/active_storage/blobs/_blob.html.erb b/actiontext/app/views/active_storage/blobs/_blob.html.erb index 049f57e804..49ba357dd1 100644 --- a/actiontext/app/views/active_storage/blobs/_blob.html.erb +++ b/actiontext/app/views/active_storage/blobs/_blob.html.erb @@ -1,6 +1,6 @@
attachment--<%= blob.filename.extension %>"> <% if blob.representable? %> - <%= image_tag blob.representation(resize_to_fit: local_assigns[:in_gallery] ? [ 800, 600 ] : [ 1024, 768 ]) %> + <%= image_tag blob.representation(resize_to_limit: local_assigns[:in_gallery] ? [ 800, 600 ] : [ 1024, 768 ]) %> <% end %>
-- cgit v1.2.3