I would like to post a subcategory suing a subsequent querie like this:
Gender.where(gender: 'Masc').categories.where(name: 'clothes').subcategories.create([{ name: 't-shirt' }])
but show a error!
i searched and i did saw nothing about how create a data using a chained query.
could someone spare a hint? thank's
Aucun commentaire:
Enregistrer un commentaire