Callback check question

I have two tables, orders and products. Orders has_many products, and
products belongs_to orders. Orders and Products both have a status
field. I’d like the order status field to be auto-updated once all of
its products have reached a certain status.

I’ve got an after_save callback for products, but I’m not sure how to
get the orders to check what its product statuses are.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs