generate functionWed, 01 Mar 2023

there is class class Gallery < ActiveRecord::Base has_many_attached :photos end rails attached photos blobs with key == 'test.jpg'

photos.blobs.where(filename: 'test.jpg')

Questions about programming?Chat with your personal AI assistant