For example I have model
class User < ApplicationRecord
has_one_attached :avatar
has_one_attached :diploma
has_many_attached :photos
has_many_attached :files
end
How to get lists of attachments names for some model (separately for has_one_attached and has_many_attached)?
[:avatar, :diploma] and [:photos, :files] in this case.