Want more GoRails?
GoRails is packed full with 719 lessons just like this one.
Sign up to get full access or log in to your account and sit back.
Your Teacher
Chris Oliver
Hi, I'm Chris. I'm the creator of GoRails, Hatchbox.io and Jumpstart. I spend my time creating tutorials and tools to help Ruby on Rails developers build apps better and faster.
About This Episode
Bulk operations like "delete all", "publish all", etc require a little bit of Javascript and a special controller for handling them.
Notes
Bulk operations like "bulk delete" or "publish all" are pretty easy to build in Rails. We can use a Stimulus controller to handle the Javascript side of things to manage our "Select All" and check boxes and simply submit those over to Rails. We can also spin up a new controller to keep bulk operations nicely organized and separate from our regular controller.