Unchecked and out of memory, I think you need something like this:
class ProductLink < ActiveRecord::Base
belongs_to :parent_product, :class_name => 'Product'
belongs_to :child_product, :class_name => 'Product'
end
class Product < ActiveRecord::Base
has_many :parent_links, :class_name => 'ProductLink', :foreign_key => :parent_product_id
has_many :child_links, :class_name => 'ProductLink', :foreign_key => :child_product_id
end
ProductLink (or whatever you choose to call it) could contain one or more additional fields describing the relationship.
, has_and_belongs_to_many, , "products_products", .