I am after a nice way to disable (not destroy, delete nor nullify) all
associated records. I’m a hoarder, I don’t want to get rid of anything
want to stop records being visible.
I have a disabled boolean in my tables and if I disable the top record
the association (say the association is 5-6 levels deep), I would like
cleanly disable its children.
I’ve looked in the source to see how AR collects all the records but
couldn’t easily track it back.
The way I’m thinking is to extend …
has_many :products do
products = all(:conditions => ‘’, :include => associations)
## but here it gets messy
Does anyone have a nicer solution to this?