Module: ActiveStorage::Blob::Identifiable

Included in:
ActiveStorage::Blob
Defined in:
app/models/active_storage/blob/identifiable.rb

Instance Method Summary collapse

Instance Method Details

#identified?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'app/models/active_storage/blob/identifiable.rb', line 8

def identified?
  identified
end

#identifyObject



4
5
6
# File 'app/models/active_storage/blob/identifiable.rb', line 4

def identify
  update! content_type: identify_content_type, identified: true unless identified?
end