MCQs > IT & Programming > Ruby On Rails > To establish an association from a Post model to another Post model (say if one post is in response to another and there is a parent_post_id column on the posts table), you would add the following to the Post model:

Ruby On Rails MCQs

To establish an association from a Post model to another Post model (say if one post is in response to another and there is a parent_post_id column on the posts table), you would add the following to the Post model:

Answer

Correct Answer: belongs_to :parent_post, :class_name => 'Post'

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