Amie Walton


450 Experience
4 Lessons Completed
0 Questions Solved


Posted in How do I extend enum method?

Is there a simple way to either extend the enum methods OR to override the current bang method? I have a lot of enum statuses that I update with bang. However, the rails enum bang method is written to update all rather than update_attribute. I don't want my use of this method to trigger a ton of validations on the class just to change one status. Has anyone else run into this?

logo Created with Sketch.

Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more. Icons by Icons8

© 2022 GoRails, LLC. All rights reserved.