title: Ruby on Rails - Regroup data from two models in a view
body: <p>I have the "picture" model and "movie" model. In the index view, I would like to show them in the "created_at" order without looking if this is a movie or a picture. The only thing I struggle with is how to loop through both of this models in the same loop.<BR/> This is how I loop for a single model in the view.<BR/>For movie model :  </p>
  
  <pre><code>&lt;% @movies.each do |m| %&gt;
  ...
  &lt;%end%&gt;
  </code></pre>
  
  <p>For picture model :</p>
  
  <pre><code>&lt;% @pictures.each do |m| %&gt;
  ...
  &lt;%end%&gt;
  </code></pre>
  
  <p>And both of this model are already order by date "created_at" :</p>
  
  <pre><code>  def index
      @galeries = Galerie.order('created_at DESC')
    end
  </code></pre>