If you create a new ActiveStorage model and then send the :attach
method to it, will there be any blobs left in the database when the transaction is rolled back? In a scenario like this:
class User < ApplicationRecord
has_one_attached :avatar
validates :name, presence: true
end
class UsersController < ApplicationController
def create
user = User.new(name: '', handle: 'peterbaker')
user.avatar.attach(io: File.open("/path/to/face.jpg"), filename: "face.jpg", content_type: "image/jpg")
user.save!
end
end