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)


11
12
13
# File 'app/models/active_storage/blob/identifiable.rb', line 11

def identified?
  identified
end

#identifyObject



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

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