aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage
diff options
context:
space:
mode:
authorEileen M. Uchitelle <eileencodes@users.noreply.github.com>2018-02-09 09:18:11 -0500
committerGitHub <noreply@github.com>2018-02-09 09:18:11 -0500
commitb6ee4e4b989bfc2fe50b2b830fdcb90ef9e23d9a (patch)
tree0cb87d5f4002193d32e241f34c2aede2ebeef4b0 /activestorage
parent172c80dfd98d0a5443e6dd8eaa8b9e4f147149d9 (diff)
parent6ee504b1d77292b8930c19a89900f5c0f3c47806 (diff)
downloadrails-b6ee4e4b989bfc2fe50b2b830fdcb90ef9e23d9a.tar.gz
rails-b6ee4e4b989bfc2fe50b2b830fdcb90ef9e23d9a.tar.bz2
rails-b6ee4e4b989bfc2fe50b2b830fdcb90ef9e23d9a.zip
Merge pull request #31927 from mrreynolds/patch-2
Document :combine_options
Diffstat (limited to 'activestorage')
-rw-r--r--activestorage/app/models/active_storage/variation.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/activestorage/app/models/active_storage/variation.rb b/activestorage/app/models/active_storage/variation.rb
index da4af62666..12e7f9f0b5 100644
--- a/activestorage/app/models/active_storage/variation.rb
+++ b/activestorage/app/models/active_storage/variation.rb
@@ -8,6 +8,14 @@
#
# ActiveStorage::Variation.new(resize: "100x100", monochrome: true, trim: true, rotate: "-90")
#
+# You can also combine multiple transformations in one step, e.g. for center-weighted cropping:
+#
+# ActiveStorage::Variation.new(combine_options: {
+# resize: "100x100^",
+# gravity: "center",
+# crop: "100x100+0+0",
+# })
+#
# A list of all possible transformations is available at https://www.imagemagick.org/script/mogrify.php.
class ActiveStorage::Variation
attr_reader :transformations