MCQs > IT & Programming > Ruby On Rails > What is the difference between :dependent => :destroy and :dependent => :delete_all in Rails?

Ruby On Rails MCQs

What is the difference between :dependent => :destroy and :dependent => :delete_all in Rails?

Answer

Correct Answer: In :destroy, associated objects are destroyed alongside the object by calling their :destroy method, while in :delete_all, they are destroyed immediately, without calling their :destroy method.

Explanation:

Note: This Question is unanswered, help us to find answer for this one

Ruby On Rails Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

Ruby On Rails Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it