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
16 17 18 |
# File 'app/models/active_storage/blob/identifiable.rb', line 16 def identified? identified end |
#identify ⇒ Object
4 5 6 7 |
# File 'app/models/active_storage/blob/identifiable.rb', line 4 def identify identify_without_saving save! end |
#identify_without_saving ⇒ Object
9 10 11 12 13 14 |
# File 'app/models/active_storage/blob/identifiable.rb', line 9 def identify_without_saving unless identified? self.content_type = identify_content_type self.identified = true end end |