diff options
author | Janko Marohnić <janko.marohnic@gmail.com> | 2018-04-22 23:40:42 +0200 |
---|---|---|
committer | Janko Marohnić <janko.marohnic@gmail.com> | 2018-04-22 23:40:42 +0200 |
commit | f01e2498905ec057e6c8872d15f8dea18d4cbde8 (patch) | |
tree | 1bea7946fd93571a3e12841409179571b05495ce /activestorage/app/models/active_storage | |
parent | ca1296858788780dcb5497e86f66b56170cca279 (diff) | |
download | rails-f01e2498905ec057e6c8872d15f8dea18d4cbde8.tar.gz rails-f01e2498905ec057e6c8872d15f8dea18d4cbde8.tar.bz2 rails-f01e2498905ec057e6c8872d15f8dea18d4cbde8.zip |
Rename ActiveStorage.processor to .variant_processor
Diffstat (limited to 'activestorage/app/models/active_storage')
-rw-r--r-- | activestorage/app/models/active_storage/variant.rb | 4 | ||||
-rw-r--r-- | activestorage/app/models/active_storage/variation.rb | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/activestorage/app/models/active_storage/variant.rb b/activestorage/app/models/active_storage/variant.rb index 1cae2078f0..450ce3677f 100644 --- a/activestorage/app/models/active_storage/variant.rb +++ b/activestorage/app/models/active_storage/variant.rb @@ -13,10 +13,10 @@ require "active_storage/downloading" # {libvips}[http://jcupitt.github.io/libvips/] processor operated by the {ruby-vips}[https://github.com/jcupitt/ruby-vips] # gem). # -# Rails.application.config.active_storage.processor +# Rails.application.config.active_storage.variant_processor # # => :mini_magick # -# Rails.application.config.active_storage.processor = :vips +# Rails.application.config.active_storage.variant_processor = :vips # # => :vips # # Note that to create a variant it's necessary to download the entire blob file from the service and load it diff --git a/activestorage/app/models/active_storage/variation.rb b/activestorage/app/models/active_storage/variation.rb index 3bdbc5bacb..259bbc743e 100644 --- a/activestorage/app/models/active_storage/variation.rb +++ b/activestorage/app/models/active_storage/variation.rb @@ -103,10 +103,10 @@ class ActiveStorage::Variation image.tempfile.tap(&:open) end - # Returns the ImageProcessing processor class specified by `ActiveStorage.processor`. + # Returns the ImageProcessing processor class specified by `ActiveStorage.variant_processor`. def processor require "image_processing" - ImageProcessing.const_get(ActiveStorage.processor.to_s.camelize) if ActiveStorage.processor + ImageProcessing.const_get(ActiveStorage.variant_processor.to_s.camelize) if ActiveStorage.variant_processor rescue LoadError ActiveSupport::Deprecation.warn("Using mini_magick gem directly is deprecated and will be removed in Rails 6.1. Please add `gem 'image_processing', '~> 1.2'` to your Gemfile.") end |