Consider the following scenario:
In a web application users are given an ability to customize what
is displayed on their homepage.
All options they get for customization are already implemented as
separate pages server by different controllers.
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 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
http://github.com/apotonick/cells_examples/tree/master 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?