阅读背景:

Ruby on Rails -父对象创建带有子对象的对象。

来源:互联网 

I have a parent object that has a polymorphic-has_many association with a child. The child does not have any backward-relation to its parent. It only has a polymorphic relation with itself. Using AJAX I would like to send the parent object up. I would like for the parent object to include the child and create the child along-side itself in the create section of the parent controller. The code however is not liking something that I am doing and is failing. I am not sure if this is a problem with naming-convention (IE: the name of the object being passed to rails) or a problem with the linking of the relationships between the models.I have a parent object that has a polymorphic-h




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: