Addressing your first question, the model Item belongs to category and subcategory. 1. Is Item allowed to have a subcategory without having a category? 2. Can Item have a category without having a subcategory?
It would be possible to make 2 select drop downs, one for category and one with subcategory and have it change the values in subcategory when you change category.. I can help you address this issue once I have answers to the above. On Jan 5, 6:00 pm, chouti <[email protected]> wrote: > I have 3 models, item, category and subcategory. > > model item: > belongs_to :category > belongs_to :subcategory > > model subcategory > belongs_to :category > has_many :items > > model category > has_many :items > has_many :subcategories > > I include category and subcategory as subform in item, and when create/ > update one item, now I can see 2 nested subform, one is category and > one is subcategory. Also, in subcategory I have one select menu for > category. > > I don't want the full CURD function, I only need can select and can > create new one if not in the list. Can I make it by API? > > The other question is can I make 2 select menu(category and > subcategory) as dynamic select menu? Means, when I change the category > value, subcategory value should also change automatically. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "ActiveScaffold : Ruby on Rails plugin" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/activescaffold?hl=en -~----------~----~----~----~------~----~------~--~---
