This question is related to: How to link form after creating rails join table
I Had a products model, with a categories field, however needed each category in individual rows rather than the comma separated rows they were in. So I created a Category and ProductCategory model, and added all appropriate associations.
How do I link up the categories field from the old products model to the new Category table so that when a user enter a new product and adds the category, it will save to the category table.