I think that paginating your ingredients is overkill. How many would you ever have in a single recipe?
If you're viewing a single Recipe, just list the associated Ingredients in the same view. Just loop through associated Ingredient array. On Mon, Mar 19, 2012 at 3:14 PM, pokerphp <blog...@holdem.lt> wrote: > Hi, > > I have Recipe hasAndBelongsToMany Ingredient. > > I want to be able to browse ingredients of the recipe using next/prev > navigation. > Should it be done in RecipesController, or the IngredientsController? > > The way i see it is, if I use ingredients/view to display an ingredient, I > have no way of knowing which Recipe I'm in (because same ingredient might be > used in multiple recipes) unless i keep track of the recipe_id in some way. > If i use recipes/viewIngredient instead, i now have to keep track of the > ingredient_id... Doesn't seem nice either. > > Or am i doing/understanding something totally wrong here? I mean, maybe I > should use IngredientsRecipesController, or something else yet? > > -- > Our newest site for the community: CakePHP Video Tutorials > http://tv.cakephp.org > Check out the new CakePHP Questions site http://ask.cakephp.org and help > others with their CakePHP related questions. > > > To unsubscribe from this group, send email to > cake-php+unsubscr...@googlegroups.com For more options, visit this group at > http://groups.google.com/group/cake-php -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php