The Placement Model
Learn how to generate the Placement model.
We'll cover the following...
We'll cover the following...
We need to set up the association between the order and the product with a has-many-to-many association. As each product can be placed in multiple orders and each order can have multiple products, we need a model that will join the two objects and map the appropriate association.
Generate the Placement model
Let’s generate the Placement model using this command in the terminal below:
$ rails generate model ...