generate functionWed, 01 Mar 2023

rails find attached blobs by key

def find_attached_blobs(key) ActiveStorage::Blob.where( key: ActiveStorage::Blob.service.send(:path_for, key) ) end

Want to kickstart your project?Use the new AI Studio to create your code