I’m creating a new model bt
class BT < ActiveRecord::Base
and gather BT in a controller like this
@bts = BT.find_by_product_id(@product.id)
then render in a view like this
and I got the following error
undefined method `each_with_index’ for #BT:0x45ed70c
Any setting I should add to the BT model to get the method work?