The has_related_products? method on a product (explained in the Readme) doesn't work like the example tells you.
product.has_related_products?("accessories") just checks if the relation type "accessories" is defined in general. Not if the product got relations with relation type "accessories".
The
has_related_products?
method on a product (explained in the Readme) doesn't work like the example tells you.product.has_related_products?("accessories")
just checks if the relation type "accessories" is defined in general. Not if the product got relations with relation type "accessories".See: https://github.com/spree/spree_related_products/blob/2-2-stable/app/models/spree/product_decorator.rb#L64