Slightly longer answer: destroy will not automatically destroy
associated records. Rather than have Rails default to destroying your
data, it sensibly refrains from rampages of destruction and leaves the
owner of the data to decide its fate.
Basically, when you call 'destroy' on an object, it will not
automatically remove the associated records unless you specifically ask
it to in the 'has_many' declaration.
askegg's long answer is quite poetic but a little complicated :0)
Basically, when you call 'destroy' on an object, it will not
automatically remove the associated records unless you specifically ask
it to in the 'has_many' declaration.
askegg's long answer is quite poetic but a little complicated :0)
What he said
You don't want a framework to assume you want all related data to be
destroyed.