I've seen this asked once asked before, but I haven't seen a good
response. If components are "bad" how does one avoid using them?
I have a list of items on a page. Each item can be one of two types.
We don't know which type the item is until the user selects it and
submits. If it's type 1, the info loads in an AJAX page from the same
controller. If it's type 2, the controller redirects to a different
controller which then loads into the AJAX area.
Now, I am trying to get the page to load the last selected item
immediately without AJAX when it is first visited. Obviously, I can
no longer redirect in the same way. Therefore I have to either call
the other controller's action as a component, or combine the logic
from both controllers into one which gets the right data and renders
the correct partials. However, I do not want to combine the logic
from both controllers.
How should I solve this problem then?