title: Passing error messages through flash
body: <p>What is the best way to push error messages on redirect to?</p>
  
  <p>I've previously used couple of approaches, but both of them has issue.</p>
  
  <p>(1) Passing the entire object with error on flash and using error_messages_for:</p>
  
  <pre><code>  def destroy
      if @item.destroy
        flash[:error_item] = @item
      end
      redirect_to some_other_controller_path
    end
  </code></pre>
  
  <p>I found that this method causes cookie overflows.</p>
  
  <p>(2) Passing a single error message:</p>
  
  <pre><code>  def destroy
      if @item.destroy
        flash[:error] = @item.full_messages[0]
      end
      redirect_to some_other_controller_path
    end
  </code></pre>
  
  <p>This way I only send a single error message, what if there are many?
   Does Anyone knows a better way?</p>