Controllers reuse or the way to reuse code along with views

Consider the following scenario:

1. In a web application users are given an ability to customize what is displayed on their homepage.

2. All options they get for customization are already implemented as separate pages server by different controllers.

3. Now I would like to have some super-method available at fixed URL which will decide based on user settings which page to serve to the user and call the appropriate controller.

Now of course I will be told that it's violation of main doctrines and basic principles :slight_smile: and I'm not supposed to do that, and I agree to some extent (seems like someone already did this anyway

).

But this in my thinking brings another question - how to reuse just code along with views? There is Cells plugin GitHub - apotonick/cells_examples: A rails project to demonstrate cells in action. but I'm sort of wary about bringing this in, especially since ActionControllers already have what I need, i.e. the code with attached views.

Moving the shared code to the module will work but only to the some extent since there will be no conventional place for templates, no simple way to define filters, etc.

Probably there is something I'm missing out?

TIA, Evgeniy