Method: ActiveStorage::Attached::One#blank?
- Defined in:
- activestorage/lib/active_storage/attached/one.rb
#blank? ⇒ Boolean
Returns true if an attachment is not attached.
class User < ApplicationRecord
has_one_attached :avatar
end
User.new.avatar.blank? # => true
44 45 46 |
# File 'activestorage/lib/active_storage/attached/one.rb', line 44 def blank? !attached? end |