MCQs > IT & Programming > Ruby On Rails > Difference between 'has_many :through' and 'has_and_belongs_to_many'?

Ruby On Rails MCQs

What is the difference between "has_many :through" and "has_and_belongs_to_many"?

Answer

Correct Answer: You should use "has_and_belongs_to_many" if you need validations, callbacks or extra attributes on the join model

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