Skip to main content

How to use rails and sortable connected lists

Rails • Asked by Graeme Ellis
83133c63aba4e73eb28323f788eeeeb6
Hello!

I'm trying to create sortable connected lists with a single modal. Two lists that I want to move items between and then display. I've successfully followed the video on sortable with a single list. Should I add a table column that tracks which list the item is in?
http://jqueryui.com/sortable/#connect-lists

Summary, how should I record what list an item is in? and then of course how can I display the two list in a view?

I'm over my head on this one for sure 😆. 
Thanks for your help!
Graeme

Ce795239ba5dd2384fc2f88ffaff5451
Hey Graeme, 

Did you see the Trello series? We cover moving between multiple lists in that. It'd be slightly different code since it's in Vue.js but the concept would be all the same. You would need a List model and association to keep track like you mentioned.

83133c63aba4e73eb28323f788eeeeb6
Thanks Chris! I'll check it out

Login or Create An Account to join the conversation.

Subscribe to the newsletter

Join 18,000+ developers who get early access to new screencasts, articles, guides, updates, and more.

By clicking this button, you agree to the GoRails Terms of Service and Privacy Policy.

More of a social being? We're also on Twitter and YouTube.