Module: ActiveStorage::Blob::Identifiable
Overview
Active Storage Blob Identifiable
Instance Method Summary
collapse
Instance Method Details
#identified? ⇒ Boolean
17
18
19
|
# File 'app/models/active_storage/blob/identifiable.rb', line 17
def identified?
identified
end
|
#identify ⇒ Object
5
6
7
8
|
# File 'app/models/active_storage/blob/identifiable.rb', line 5
def identify
identify_without_saving
save!
end
|
#identify_without_saving ⇒ Object
10
11
12
13
14
15
|
# File 'app/models/active_storage/blob/identifiable.rb', line 10
def identify_without_saving
unless identified?
self.content_type = identify_content_type
self.identified = true
end
end
|