Sounds like you need some Javascript. You should be able to use Javascript to manipulate a hidden field that will contain an array of items, or their ids. You will need to get your hands dirty with Javascript, I see no other "DOM-oriented" way to do it.
if you're not opposed to Jquery I'd just recommend jQuery UI's draggable which implements many hooks that will be good for you https://jqueryui.com/draggable/ <https://jqueryui.com/draggable/> -Jason > On Jul 20, 2019, at 9:24 PM, John Sanderbeck <bandor...@gmail.com> wrote: > > I understand that part Walter. I have done many nested forms. However, this > is the first one with a drag and drop feature. > > The part I am struggling with is how to populate the array that gets passed > back through the drag and drop events. > > I have the strong params setup and could easily just add a simple nested > form, but I wanted to add the drag and drop as a feature so they could build > the meals easily with an IPad. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/9275449B-6023-45AA-ADCB-D6934AC4EB8E%40datatravels.com.