mardi 19 avril 2016

How Seed Data Relationships in Rails?

I would like to put more than one subcategory per category or category per subcaregory and maybe a third category related on a seed.

for exemple: () = have

category >>>> item 1 item 2 item 3 
subcategory >>>> item 2(subitem 1 subitem 2 subitem 3)
thirdcategory >>>> subitem 3(thirditem 1 thirditem 2)

Someone have a idea the way to acomplish this with seeds?

Aucun commentaire:

Enregistrer un commentaire