sortablejs-rails
A gem that provides the SortableJS library to Rails's asset pipeline.
How to Use
Ruby on Rails >= 8.x
- Add the gem to your Rails Gemfilefile (e.g.gem "sortablejs-rails") and run bundler
- Edit app/assets/config/manifest.jsand add//= link sortable.min.js
- Edit config/importmap.rband addpin "sortablejs", to: "sortable.min.js"
- Restart your Rails app and SortableJS is loaded as JavaScript library
Ruby on Rails < 8.x
- Add the gem to your Rails Gemfilefile (e.g.gem "sortablejs-rails") and run bundler
- Add SortableJS to your app/assets/javascript/application.jsfile like this://= require sortable.min
- Restart your Rails app and SortableJS is loaded as JavaScript library
As this library just provides the SortableJS library to Rails, you may want to check out the developers documentation, to get an understanding how you can use SortableJS (click).
License
This project uses the upstream license MIT like upstream.