Closed jmuheim closed 5 years ago
Hi @jmuheim, this doesn't have anything to do with acts_as_list
:)
You may want to look at the inverse_of
option on your relationship declarations:
Especially true since this is a self-referential relationship and Rails probably won't know how to untangle that and guess the inverse.
Hope that helps :) Feel free to report back here if you solve it anyway.
I have the following list structure:
I would expect that
root_element
now knows that it has a childsub_element
, but it doesn't:Only when I reload manually:
If I assign
sub_element
to theroot_element
......this problem doesn't happen:
Is this expected behaviour? Is there a way to make the code at the top work without the need of triggering
reload
manually?