All Lessons / Bulk Operations in Rails

Want more GoRails?

GoRails is packed full with over 350 lessons just like this one.

Sign up to get full access or log in to your account and sit back.

Bulk Operations in Rails

#369 ยท November 4, 2020

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.

Resources

Discussion

Loading...
logo Created with Sketch.

Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

© 2020 GoRails, LLC. All rights reserved.