Ask A Question

Notifications

You’re not receiving notifications from this thread.

How do I extend enum method?

Amie Walton asked in Rails

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?

Reply
Join the discussion
Create an account Log in

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

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

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