use only object_id instead parent class and parent id test cases assert_equal use table name in references fix minor problems