title: Insert aws urls into an array
body: <p>I currently have a working audio player that uses paperclip attachments to upload to aws. I want to access all the urls for all tracks and insert them in an array or variable for use with my js audio player. Below is the following code that I have tried:</p>
  
  <pre><code>//incorrect code
   @tracks.each do |m|
    @tracks_url_list = m.audio
   end
  </code></pre>
  
  <p>I have also tried</p>
  
  <pre><code>//incorrect code
  @tracks.each do |m|
    @tracks_url_list = Array[m.audio]
   end
  </code></pre>
  
  <p>When I implement</p>
  
  <pre><code>&lt;% @tracks.each do |m| %&gt;
    &lt;%= m.audio %&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>In the index.html.erb it displays
  <a href="http://s3.amazonaws.com/musicstreamdata/tracks/audios/000/000/008/original/11_Acid_Rain_%28Prod._by_Jake_One%29_%28DatPiff_Exclusive%29.mp3?1457290530" rel="nofollow">http://s3.amazonaws.com/musicstreamdata/tracks/audios/000/000/008/original/11_Acid_Rain_%28Prod._by_Jake_One%29_%28DatPiff_Exclusive%29.mp3?1457290530</a></p>
  
  <p>and other track links show as well. However, when I try to store it inside a variable or array, it only shows one url for one track. I'm probably missing something obvious, but how do I get it so that I can store all the urls from my tracks in an array like this:</p>
  
  <pre><code>@track_url_lists = [track_one_url, track_two_url, track_three_url, etc. ]
  </code></pre>
  
  <p>I appreciate any help</p>