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.

Bulk Operations in Rails

November 4, 2020

Track your progress

Sign in to track your progress and access subscription-only lessons.

Log In

Your Teacher

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.

Resources

Want to stay up-to-date with Ruby on Rails?

Join 86,946+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.