method

attached?

rails latest stable - Class: ActiveStorage::Attached::One
attached?()
public

Returns true if an attachment has been made.

class User < ApplicationRecord
  has_one_attached :avatar
end

User.new.avatar.attached? # => false