我正在尝试关联现有记录,同时仍然能够添加新记录。以下不起作用,但非常接近我需要的。如何完成关联现有记录和创建新记录?has_many:comments,:through=>:commentings,:source=>:commentable,:source_type=>"Comment"accepts_nested_attributes_for:comments,:allow_destroy=>truedefautosave_associated_records_for_commentscomments.eachdo|comment|ifexisting_comment=Comment