dkniffin / activeadmin_reorderable

Adds drag and drop reordering to your ActiveAdmin tables
MIT License
55 stars 22 forks source link

Add ability to show flash message when a reorder is saved #14

Closed yjukaku closed 1 year ago

yjukaku commented 2 years ago

Without some sort of UI element acknowledging the change, it's hard for the user to know that the change was saved automatically.

This PR adds some JS code to listen to the POST /reorder ajax request and on success or error, display a message within AA's default flashes div.

I personally think this is something that could be default behavior, but for now, I've left it as something that has to be enabled for each call to reorderable_table like this:

reorderable_table_for collection, "data-show-flash-messages": true do