activegraph icon indicating copy to clipboard operation
activegraph copied to clipboard

Add support <attribute>_attributes in ActiveNode (nested models)

Open DavidChouinard opened this issue 9 years ago • 4 comments

Since ActiveNode doesn't support ActiveRecord's accepts_nested_attributes_for, they should support ActiveModel's <attribute>_attributes method for seamless support of nested models.

Adding such attributes currently causes the form helper to silently fail and the nested form to not be rendered.

See this Stack Overflow thread.

DavidChouinard avatar Apr 15 '15 18:04 DavidChouinard

I'd be curious to see where in ActiveModel this is implemented so we can figure out why it's not working here and what it'd take. I'm going to guess that the method of attr_reader + <attribute>_attributes is a way of monkey patching methods that ActiveRecord and other ORMs use that we don't.

If this is in pursuit of accepts_nested_attributes_for-like functionality, I think it might be worth revisiting implementation of that. I started hunting it down last year, it's how we ended up with the association cache and association reflections, but it's a pretty complicated feature that is going to involve adding support for a few other ActiveRecord features. In particular, we need autosaving of associations.

subvertallchris avatar Apr 16 '15 14:04 subvertallchris

:+1:

Is there any other way to achieve nested forms using Neo4j 5.x ?

danpe avatar Nov 15 '15 18:11 danpe

Is this planned to be implemented? Is there a substitute way to do this documented anywhere?

mvuk avatar May 11 '18 04:05 mvuk

No plans currently. PRs welcome

cheerfulstoic avatar May 20 '18 00:05 cheerfulstoic