I have two tables “products” & “productdetails” in my productdetails
table I have a foreign key field called “product_id”
If I am editing product number “3” and run the following I can get and
display the detail information.
@product = Product.find(params[:id])
@categories = Category.find_all
@productdetails = Productdetail.find(:all, :conditions =>
[“product_id = 3”])
How do make that “3” be the product id from the products table
dynamically - so it always represents the product I am currently working
on. I’ve tried some different things but nothing is working.
Any help is appreciated.