undefined method ' each_with_index'

The line:

@bts = BT.find_by_product_id(@product.id)

is only returning a single BT. You’re trying to render as if you had a collection of BTs, thus:

@bts = BT.find_all_by_product_id(@product.id)

should fix your problem.

Jason