instance method operations

Ruby on Rails 6.0.6

Since v6.0.6 Private

Available in: v6.0.6 v6.1.7.10 v7.0.10 v7.1.6 v7.2.3 v8.0.4 v8.1.2

Signature

operations()

No documentation comment.

Source
# File activestorage/lib/active_storage/transformers/image_processing_transformer.rb, line 316
        def operations
          transformations.each_with_object([]) do |(name, argument), list|
            if ActiveStorage.variant_processor == :mini_magick
              if name.to_s == "combine_options"
                argument.each do |subtransformation_name, subtransformation_argument|
                  validate_transformation(subtransformation_name, subtransformation_argument)
                end
              else
                validate_transformation(name, argument)
              end
            end

            if name.to_s == "combine_options"
              ActiveSupport::Deprecation.warn <<~WARNING.squish
                Active Storage's ImageProcessing transformer doesn't support :combine_options,
                as it always generates a single ImageMagick command. Passing :combine_options will
                not be supported in Rails 6.1.
              WARNING

              list.concat argument.keep_if { |key, value| value.present? }.to_a
            elsif argument.present?
              list << [ name, argument ]
            end
          end
        end

Defined in activestorage/lib/active_storage/transformers/image_processing_transformer.rb line 316 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveStorage::Transformers::ImageProcessingTransformer

Type at least 2 characters to search.

↑↓ navigate · open · esc close