This problem is a continuation of an earlier thread "Partial doesn't yet have object" but I don't think as many people saw it because my question came up in a reply.
- I'm building an store app that include a product catalog, details page, and cart. - I'm attempting to put them in the same layout using partials. - Product catalog is the index action of the store controller
Clicking on the product in the catalog invokes the "view_details" action, which is fine if it not a partial (i.e. path in the browser is /store/view_details/5). The problem is, according to my understanding so far of partials, the action in "view_details" must "redirect_to :action => :index". Because of that redirect, it appears as though the selection doesn't persist and therefore my "view_details" (i.e. the currently selected item) never displays.
So I'm starting to think that I have to store the current product selected in the session by way of something like a "Basket" (more temporary than a cart? good names are welcome) model.
Does that makes sense? Or is there a better way to make my selection persist so I can display the catalog, deatails and cart all on the same page?