aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage
diff options
context:
space:
mode:
authorlucfranken <lucfranken@tentoday.com>2018-05-17 12:49:11 +0200
committerGitHub <noreply@github.com>2018-05-17 12:49:11 +0200
commit8cc79f502e4b5e3f4fcdcf9af2a5caf047312fb9 (patch)
tree9b159669f14ef9eb5e8c19a4e8e49a0fd0ae742e /activestorage
parenta1f9fe8bdd4e6c4e20fbda424c0ecf2f31fabd30 (diff)
downloadrails-8cc79f502e4b5e3f4fcdcf9af2a5caf047312fb9.tar.gz
rails-8cc79f502e4b5e3f4fcdcf9af2a5caf047312fb9.tar.bz2
rails-8cc79f502e4b5e3f4fcdcf9af2a5caf047312fb9.zip
Active storage: Image variant options not correct
### Steps to reproduce Using Rails 5.2.0 When following this example: http://api.rubyonrails.org/classes/ActiveStorage/Variant.html `avatar.variant(resize: "100x100", monochrome: true, flip: "-90")` ### Expected behavior Image should be rendered as flipped. ### Actual behavior I get an error: > failed with error: gm mogrify: Unrecognized option (-90). ### Fix: According to: https://github.com/minimagick/minimagick the option should be called rotate: `avatar.variant(resize: "100x100", monochrome: true, rotate: "-90")` So **flip** changed to **rotate**. ### System configuration **Rails version**: 5.2.0 **Ruby version**: ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-darwin17]
Diffstat (limited to 'activestorage')
-rw-r--r--activestorage/app/models/active_storage/variant.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activestorage/app/models/active_storage/variant.rb b/activestorage/app/models/active_storage/variant.rb
index 2a7006553c..1df36e37d9 100644
--- a/activestorage/app/models/active_storage/variant.rb
+++ b/activestorage/app/models/active_storage/variant.rb
@@ -42,7 +42,7 @@
# You can combine any number of ImageMagick/libvips operations into a variant, as well as any macros provided by the
# ImageProcessing gem (such as +resize_to_fit+):
#
-# avatar.variant(resize_to_fit: [800, 800], monochrome: true, flip: "-90")
+# avatar.variant(resize_to_fit: [800, 800], monochrome: true, rotate: "-90")
#
# Visit the following links for a list of available ImageProcessing commands and ImageMagick/libvips operations:
#