1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
# frozen_string_literal: true module ActiveStorage::Blob::Identifiable def identify update!(content_type: identification.content_type, identified: true) unless identified? end def identified? identified end private def identification ActiveStorage::Identification.new self end end