title: How to get all childs active-storage attachments in rails?
body: <p>let's say there are 2 models. </p>
  
  <p>user model:</p>
  
  <p>has_many :posts </p>
  
  <p>post model: </p>
  
  <p>belongs_to :user</p>
  
  <p>has_many_attached :files, dependent: :destroy</p>
  
  <p>what I want is simply all files of the user. something like:</p>
  
  <p>has _may :post_files , through: posts, class_name: "XXX" </p>
  
  <p>or any other way which can give me all the files of the user.</p>
  
  <p>so I want all files of all posts which belong to the user. like user.post_files </p>