diff options
author | George Claghorn <george@basecamp.com> | 2017-07-23 17:06:45 -0400 |
---|---|---|
committer | George Claghorn <george@basecamp.com> | 2017-07-23 17:06:45 -0400 |
commit | ac26aef11f1be08917f3190b3d2b7ba4434444f7 (patch) | |
tree | c0e5826ba960c97ae823f03a383cbac4a91e230f | |
parent | df698991612575fe015d27bc138c5111de384c15 (diff) | |
download | rails-ac26aef11f1be08917f3190b3d2b7ba4434444f7.tar.gz rails-ac26aef11f1be08917f3190b3d2b7ba4434444f7.tar.bz2 rails-ac26aef11f1be08917f3190b3d2b7ba4434444f7.zip |
Require mini_magick when it's used
-rw-r--r-- | app/models/active_storage/variant.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/active_storage/variant.rb b/app/models/active_storage/variant.rb index 435033f980..c12c29c453 100644 --- a/app/models/active_storage/variant.rb +++ b/app/models/active_storage/variant.rb @@ -1,5 +1,4 @@ require "active_storage/blob" -require "mini_magick" # Image blobs can have variants that are the result of a set of transformations applied to the original. class ActiveStorage::Variant @@ -30,6 +29,7 @@ class ActiveStorage::Variant end def transform(io) + require "mini_magick" File.open MiniMagick::Image.read(io).tap { |image| variation.transform(image) }.path end end |