title: conditional view/layout
body: <p>Say there is a product controller which you want to have an index (list products) action. Easy. Now say you have an admin and store parts in your project. Both need to list products, but in a slightly different manner (store's one shouldn't have this edit product link for instance). They also use different layouts.</p>
  
  <p>So far my idea is to have two product controllers under different namespaces - <code>app/controllers/admin/products_controller.rb</code> and <code>app/controllers/store/products_controller.rb</code> - each then having its own views and layouts. But I suspect this may lead to WET code. Or to references to other controller views (which imo breaks modularity and hence should be avoided).</p>
  
  <p>So, the actual question: is there a more DRY (or in fact proper) way to achieve the above?</p>
  
  <p>I'm not sure the title actually reflects the question. But, on the other hand, if it were, I could probably google the answer. </p>
  
  <p><strong>EDIT</strong>
  As of 3.1, Rails supports template inheritance.</p>