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.
So far my idea is to have two product controllers under different namespaces - app/controllers/admin/products_controller.rb
and app/controllers/store/products_controller.rb
- 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).
So, the actual question: is there a more DRY (or in fact proper) way to achieve the above?
I'm not sure the title actually reflects the question. But, on the other hand, if it were, I could probably google the answer.