Form to create entries in many-to-many relationship with nested models
问题 My application consists of these five models: A supermarket can have different categories of products and the products in these categories can be produced by several brands . Now I want to have one (or two) Selection -field(s) in my supermarket -form in which I can select one element in Category with its name appearing and one or more element(s) in Brand with its name appearing, so this could be stored in Origin . I think I could use collection_select , but how do I utilize it here? class