mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Require mini_magick when it's used
This commit is contained in:
parent
df69899161
commit
ac26aef11f
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue