title: Rails Displaying Flash Messages from Model
body: <p>I'm trying to display some error messages from my model in Rails. Currently, when an exception is caught in my <code>test</code> model and raised, the messages are returned as expected in the errors scope of my object. The messages are returned as follows:</p>
  
  <pre><code> {:key1=&gt;["Your key needs to be different."], 
   :key2=&gt;["Another exception"]}
  </code></pre>
  
  <p>This is perfect, as the correct exceptions are being thrown for the correct errors. What I'm trying to do now is bind these messages to the flash scope so that I can display them on my view. In my controller, when I have an exception, I then bind it to the <code>flash[:error]</code> scope as follows:</p>
  
  <pre><code> flash[:error] = @test.errors.messages
   render :new
  </code></pre>
  
  <p>Upon doing this, my errors are bound to the flash scope, but when I output them on my view, they are displayed as follows:</p>
  
  <pre><code> [:error, {:key1=&gt;["Your key needs to be different."], :key2=&gt;["Another exception"]}]
  </code></pre>
  
  <p>All I'd like to do is display each one of these messages so that they look to be like:</p>
  
  <pre><code> Your key needs to be different.
   Another exception.
  </code></pre>
  
  <p>Notice that in the above example, all that will be rendered is the message text. </p>
  
  <p>Will you please point me in the right direction as to what I need to change either in my controller or in my view to achieve the desired output above? </p>
  
  <p>Thank you in advance.</p>