title: Two controllers for one shared view in Ruby on Rails
body: <p>I have two controllers for two respective models, by example, photos and categories. index and show methods are very similar in each controller, and the views are identical. What is the best method for share the view by the two models?</p>
  
  <p>I've though two options:</p>
  
  <ul>
  <li><p>Use a helper. In the helper will put the code for the view, and will call the helper from each view (photos/views and categories/views)</p></li>
  <li><p>Use a partial in each views. I think it's a more clean solution, but I see huge DRY's in my mind when going to code this solution.</p></li>
  </ul>
  
  <p>So, I have two controllers from two models, each one at and exposes a @photo object (photos controller with all the photos, and categories controller with just the selected categorie's photos) and I need one view to show both.</p>
  
  <p>I'm looking for an elegant solution for this, complaining REST and DRY principes. Any idea?</p>
  
  <p>Thanks in advance.</p>