title: Rails 5.2 API ActiveStorage how to get URL paths for multi image?
body: <p>I am migrating from paperclip to Rails 5.2 and active storage. I am using rails as API-only. </p>
  
  <p>How to get URL paths for <em>has_many_attached :images</em> </p>
  
  <p>This is the code for the single file that works:</p>
  
  <pre><code>class UserSerializer &lt; ActiveModel::Serializer
  include Rails.application.routes.url_helpers
  attributes %i[email name username]
  ....
    attribute :verification_url do
      if object.verification_file.attachment
        URI.join(ActionController::Base.asset_host, rails_blob_path(object.verification_file))
      end
    end
  ....
  
  end
  </code></pre>
  
  <p>And when I try to do something similar for multi-images I am just getting those images, not their URL.</p>
  
  <pre><code> include Rails.application.routes.url_helpers
   attributes :id, :name, :description, :images
  
   def images
    if object.images.attachments
      object.images.each do |image| 
        URI.join(ActionController::Base.asset_host, rails_blob_path(image))
      end
    end 
  end
  </code></pre>