Method: ActiveStorage::Variation#transform

Defined in:
activestorage/app/models/active_storage/variation.rb

#transform(file, &block) ⇒ Object

Accepts a File object, performs the transformations against it, and saves the transformed image into a temporary file.



56
57
58
59
60
# File 'activestorage/app/models/active_storage/variation.rb', line 56

def transform(file, &block)
  ActiveSupport::Notifications.instrument("transform.active_storage") do
    transformer.transform(file, format: format, &block)
  end
end