diff options
author | George Claghorn <george@basecamp.com> | 2019-01-24 11:46:42 -0500 |
---|---|---|
committer | George Claghorn <george@basecamp.com> | 2019-01-24 11:46:42 -0500 |
commit | c1e949e9e618f75dc446ffa584c3b441c48714b1 (patch) | |
tree | 3986e58a1759ce3954c7df7c3d8a9b30937db839 /actiontext/app/views/active_storage/blobs | |
parent | 1fecebae31029cf2287f2bae88e8730f00569778 (diff) | |
download | rails-c1e949e9e618f75dc446ffa584c3b441c48714b1.tar.gz rails-c1e949e9e618f75dc446ffa584c3b441c48714b1.tar.bz2 rails-c1e949e9e618f75dc446ffa584c3b441c48714b1.zip |
Prefer ImageProcessing's resize_to_limit macro over resize_to_fit
Don't upsize images smaller than the specified dimensions.
Diffstat (limited to 'actiontext/app/views/active_storage/blobs')
-rw-r--r-- | actiontext/app/views/active_storage/blobs/_blob.html.erb | 2 |
1 files changed, 1 insertions, 1 deletions
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 @@ <figure class="attachment attachment--<%= blob.representable? ? "preview" : "file" %> 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 %> <figcaption class="attachment__caption"> |