small medium large xlarge

Generic-user-small
06 Feb 2012, 23:02
Shaban Karumba (6 posts)

Hi how do I create individual pages for my products and also a category view for example Mens, Womens and Childrens sections to the site?

Samr_small_pragsmall
07 Feb 2012, 00:04
Sam Ruby (634 posts)

Start by defining a route. See “Adding Additional Actions” in Chapter 20.

Then modify the products_controller. Add a new method for each action. These methods will differ from the index method in the @products = Product.all line (you likely will want to have a where clause).

If these methods will share a common template, see “Rendering Templates” also in Chapter 20. Otherwise, define new views for each action.

You must be logged in to comment