instance method
blank?
Ruby on Rails 8.0.4
Since v6.0.6Signature
blank?()
Returns true if an attachment is not attached.
class User < ApplicationRecord has_one_attached :avatar end User.new.avatar.blank? # => true
Source
# File activestorage/lib/active_storage/attached/one.rb, line 44
def blank?
!attached?
end
Defined in activestorage/lib/active_storage/attached/one.rb line 44
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveStorage::Attached::One