I'm having trouble figuring out which approach is better.
I have the following tables: products, orders and line_items.
Every time an Order is placed, the quantity field in the products
table has to be updated for each LineItem in the Order. One option is
to use DB triggers which is not as portable as using before_create in
the Order model. But with before_create I cannot use fixtures for
orders and line_items since they don't use before_create as models do.
Has anyone any recommendations on which approach is better?