In my application I have 2 objects. An Item object and SubItem object. What I would like to do is make a single drop down list that has all of the Items in it, then if the item has a SubItem attached to it, then it will be displayed directly underneath that Item with some sort of indentation or marking to indicate that it is a SubItem. I don''t even know where to begin looking for this type of problem. Any ideas? ~Jeremy -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
please let me know the table structure and relationship of Item and SubItems,so that i will digg out let you know the solution. - mohan Jeremy Woertink wrote:> In my application I have 2 objects. An Item object and SubItem object. > What I would like to do is make a single drop down list that has all of > the Items in it, then if the item has a SubItem attached to it, then it > will be displayed directly underneath that Item with some sort of > indentation or marking to indicate that it is a SubItem. I don''t even > know where to begin looking for this type of problem. Any ideas? > > > > > ~Jeremy-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Jeremy Woertink said the following on 18/12/07 06:58 PM:> In my application I have 2 objects. An Item object and SubItem object. > What I would like to do is make a single drop down list that has all of > the Items in it, then if the item has a SubItem attached to it, then it > will be displayed directly underneath that Item with some sort of > indentation or marking to indicate that it is a SubItem. I don''t even > know where to begin looking for this type of problem. Any ideas?See http://www.htmldog.com/articles/suckerfish/dropdowns/ It would be great if Tabnav (q.v.) could be adapted to use this! Failing that, something that reads in a .yaml file that specifies the menu :-) -- The nice part about being a pessimist is that you are constantly being either proven right or pleasantly surprised. -- George F. Will --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Anton Aylward wrote:> Jeremy Woertink said the following on 18/12/07 06:58 PM: >> In my application I have 2 objects. An Item object and SubItem object. >> What I would like to do is make a single drop down list that has all of >> the Items in it, then if the item has a SubItem attached to it, then it >> will be displayed directly underneath that Item with some sort of >> indentation or marking to indicate that it is a SubItem. I don''t even >> know where to begin looking for this type of problem. Any ideas? > > See http://www.htmldog.com/articles/suckerfish/dropdowns/ > > It would be great if Tabnav (q.v.) could be adapted to use this! > > Failing that, something that reads in a .yaml file that specifies the > menu :-) > -- > The nice part about being a pessimist is that you are constantly > being either proven right or pleasantly surprised. -- George F. WillCool thanks. I didn''t think to do something like that. I was going more of the standard <%= f.select(:item, Item.find(:all)) %> style drop down, but this way could work too. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---