code-and-effect / effective_datatables

An effective ActiveRecord to Datatables dsl for Ruby on Rails. Make intelligent tables quickly.
MIT License
133 stars 36 forks source link

Support redirect in bulk actions via post #156

Closed Nerian closed 3 years ago

Nerian commented 3 years ago

See discussion at https://github.com/code-and-effect/effective_datatables/issues/155

This PR implements a new modifier option for bulk actions. This allow a bulk action link to act as a link that POST the selected ids to a certain URL but instead of expected a JSOn response this makes an actual form submission and thus we can link this action with another page.

Nerian commented 3 years ago

I refactored this code not use forms at all. Instead I add support for two methods of passing the ids to another page: 1) Via cookie, and 2) via local storage 🎈

matt-riemer commented 3 years ago

This revision is awesome, thank you!

Will release these changes as effective_datatables 4.9.2