I am now doing a project on ruby on rails. I created a entity named product and i want to set a many to many relation to other entity named category.
script/generate scaffold product prd_name:string category:references
By doing this code only one to one mapping is possible.How can i set many to many without hard coding?
We can not do this through scaffolding. We must edit the model of the class to set many to many relationship.