Search code examples
ruby-on-railsrubyspree

Add product to taxon in spree


I'm trying to add my products to taxons but I can't work out how its done. I can see in the schema there is spree_products_taxons but this doesn't have any model.

How do I add a product to a taxon in rails?


Solution

  • I found out that I can use product.assign_attributes(taxons:Spree::Taxon.find()) to add products to a taxon.