aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage/app/models/active_storage/preview.rb
diff options
context:
space:
mode:
authorJanko Marohnić <janko.marohnic@gmail.com>2018-04-23 21:04:35 +0200
committerJanko Marohnić <janko.marohnic@gmail.com>2018-04-23 21:04:35 +0200
commiteef0bd0c0a4da52a111639cb9fb5823057cbdf27 (patch)
tree36d4daae99ba0264a4b5c805a3529d252a812a31 /activestorage/app/models/active_storage/preview.rb
parentdc97f6c3fd2769ba29ea06a6015244be18a19893 (diff)
downloadrails-eef0bd0c0a4da52a111639cb9fb5823057cbdf27.tar.gz
rails-eef0bd0c0a4da52a111639cb9fb5823057cbdf27.tar.bz2
rails-eef0bd0c0a4da52a111639cb9fb5823057cbdf27.zip
Recommend using :resize_to_fit after all
Diffstat (limited to 'activestorage/app/models/active_storage/preview.rb')
-rw-r--r--activestorage/app/models/active_storage/preview.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activestorage/app/models/active_storage/preview.rb b/activestorage/app/models/active_storage/preview.rb
index 2b87897183..de58763399 100644
--- a/activestorage/app/models/active_storage/preview.rb
+++ b/activestorage/app/models/active_storage/preview.rb
@@ -38,7 +38,7 @@ class ActiveStorage::Preview
# Processes the preview if it has not been processed yet. Returns the receiving Preview instance for convenience:
#
- # blob.preview(resize: "100x100").processed.service_url
+ # blob.preview(resize_to_fit: [100, 100]).processed.service_url
#
# Processing a preview generates an image from its blob and attaches the preview image to the blob. Because the preview
# image is stored with the blob, it is only generated once.