title: How to get list of ActiveStorage attributes (attachment names)?
body: <p>For example I have model</p>
  
  <pre class="lang-rb prettyprint-override"><code>class User &lt; ApplicationRecord
    has_one_attached :avatar
    has_one_attached :diploma
  
    has_many_attached :photos
    has_many_attached :files
  end
  </code></pre>
  
  <p>How to get lists of attachments names for some model (separately for <code>has_one_attached</code> and <code>has_many_attached</code>)?</p>
  
  <p><code>[:avatar, :diploma]</code> and <code>[:photos, :files]</code> in this case.</p>