instance method
transform
Ruby on Rails 8.0.4
Since v5.2.8.1Signature
transform(file, &block)
Accepts a File object, performs the transformations against it, and saves the transformed image into a temporary file.
Parameters
-
filereq -
blockblock
Source
# 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
Defined in activestorage/app/models/active_storage/variation.rb line 56
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveStorage::Variation