Neo4jRB:在ActiveNode中复制accepts_nested_attributes_for功能?

时间:2015-04-15 12:42:20

标签: ruby neo4j neo4j.rb

我希望能够使用Rails'用于管理嵌套关系的本机表单基础结构。

Changelog引用了accepts_nested_attributes_for,但它似乎无效。

我可以将属性添加到作为函数的ActiveNode并手动管理相关模型的创建吗?

1 个答案:

答案 0 :(得分:1)

有趣。我必须更深入地说出来,但由于ActiveNode使用ActiveModel,似乎设置<attribute>_attributes=方法可能有所帮助。请参阅以下链接:

https://coderwall.com/p/kvsbfa/nested-forms-with-activemodel-model-objects

https://github.com/plataformatec/simple_form/wiki/Use-with-ActiveModel-compliant-models

我自己还没有尝试过,但是如果那不对open an issue的回购有帮助,我们可以看看