||Rolling with Ruby on Rails, Part 2|
|Subject:||How to?? : Showing related Recipes from the Category list|
Response to: How to?? : Showing related Recipes from the Category list
Create a list method for Category controller:
Since we changed the controller, we now have to create a custom view for the list method as app\controller\list.rhtml. You do the same as you did for recipe, but where you have the category name column, you'll use the code:
This way, you're turning the category name into a link that will invoke the /recipe/list link while setting the @category to the selected category name.