Just wondering what the best "Rails way" to do this would be.. I have a form that uses an auto complete text box and a <ul> that holds n number of selections from the text box. The <ul> is made up of multiple <li> each with the id set to the modelname_id. When the user submits the form, I parse through the <li> elements and populate two hidden form fields (one for each type of model in the <ul>) with a , separated string then on the server I split the fields and create my database records. This all works fine but it doesn't seem "right"
How should I be doing this? I thought about creating hidden input fields (one for each <li>) or create input fields in the <li> and disabling and styling them to look the way I need...? Seems like rails would be able to handle the array of fields better then the , delimited fields I'm currently using...?? Not sure of the best approach. Thanks. --~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---