RailsCasts Pro episodes are now free!
Learn more or hide this
GitHub User: donsteffenski
figured it out with
:dependent => :destroy
Thanks for this brilliant tutorial! I am new to rails and this one made a few pennies drop.
How can I achieve that destroying a question automatically destroys all associated answers records in the database?
figured it out with
:dependent => :destroy
Thanks for this brilliant tutorial! I am new to rails and this one made a few pennies drop.
How can I achieve that destroying a question automatically destroys all associated answers records in the database?