It looks like I’m a contender for a Ruby on Rails position, and I’ve been tasked with adding some functionality to a skeleton project. One of the requirements is that I implement a “drag and drop” feature that will reorder a list of events with those actions.

I’m going to show you a really simple tool to use called “SortableJs” that will make your life significantly easier.

You’re going to want to do your typical installation and require the file in your javascript/packs/application.js file.

So where the magic comes in, is tying this sortable object to the html it runs…

Austin Oie

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store