title: Rails Flash message array not parsing with recommended approach on SO
body: <p>There are a few questions about parsing the FLASH message built into Rails - everyone says it should be similar to this:</p>
  
  <pre><code>&lt;% flash.each do |key, value| %&gt;
      &lt;div id="flash_message" class="alert alert-&lt;%= key %&gt;"&gt;
          &lt;%= value %&gt;
      &lt;/div&gt;
      &lt;% end %&gt;
  </code></pre>
  
  <p>This prints the message just fine and I have a jQuery fadeout function that works ok.</p>
  
  <p>PROBLEM - what happens when I want to put multiple messages into the flash array?</p>
  
  <pre><code> flash[:success] = ["Job edited successfully"]
  else
    addNewJob(params,@cust)   
        flash[:added] = "Job Added Successfully" 
  end
  if upd
    flash[:success] &lt;&lt; "Customer Info Edited Successfully"
  else
    flash[:error] = "ERROR: Customer info could not be edited!"
  end
  </code></pre>
  
  <p>Here I'm pushing two elements into flash[:success] - and according to other posts on SO and elsewhere, this is fine, because flash.each should pull them out of the array.</p>
  
  <p>But it doesn't:</p>
  
  <pre><code>&lt;div id="flash_message" class="alert alert-success"&gt;
          ["Job edited successfully", "Customer Info Edited Successfully"]
      &lt;/div&gt;
  </code></pre>
  
  <p>This is the page source output, and it looks just like that on the page - shows the whole array as a string of sorts and then fades the whole thing.</p>
  
  <p>What I expected:</p>
  
  <p>Job edited successfully
  Customer Info Edited Successfully</p>
  
  <p>On two lines, both fade at the same time.</p>
  
  <p>Help?</p>