[Rails] Re: routing and has_many

2009-08-28 Thread sax
It sounds like your routes are set up alright, but yeah, you'll still need to add code so your action knows how to handle it. In your ProductsController#index action, you probably have something like this? @products = Product.all Since you have category_id in the params, something like this s

[Rails] Re: routing and has_many

2009-08-27 Thread Colin Law
2009/8/27 hansfh : > > Hi, > im a rails newbie, so please be gentle: > > let's say category habtm products and i've got a product with the id > 7. > > when i use the url > > /categories/7/products > > should the server show me only the categories of product 7? > > On my Server it always shows all

[Rails] Re: routing and has_many

2009-08-27 Thread Rob Biedenharn
On Aug 27, 2009, at 8:54 AM, hansfh wrote: > Hi, > im a rails newbie, so please be gentle: > > let's say category habtm products and i've got a product with the id > 7. > > when i use the url > > /categories/7/products > > should the server show me only the categories of product 7? > > On my Serve