aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage/app
diff options
context:
space:
mode:
authorRobert Glaser <mail@robert-glaser.de>2018-02-07 22:58:23 +0100
committerRobert Glaser <mail@robert-glaser.de>2018-02-08 21:54:29 +0100
commit6ee504b1d77292b8930c19a89900f5c0f3c47806 (patch)
tree552f42d55d3b551a6d03ab65868d7d8e6e991a07 /activestorage/app
parent5ae2ecab6d3365f6f17e3c8cb298dfeeea113774 (diff)
downloadrails-6ee504b1d77292b8930c19a89900f5c0f3c47806.tar.gz
rails-6ee504b1d77292b8930c19a89900f5c0f3c47806.tar.bz2
rails-6ee504b1d77292b8930c19a89900f5c0f3c47806.zip
Document :combine_options
Turns out this is still undocumented functionality.
Diffstat (limited to 'activestorage/app')
-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