@1ban これは間違いで、firstで子供を取得するとインスタンス間の親子関係が無視されるので[0]で取得すべき。そうすればいちいち詰め直す必要は無い。
railsのautosaveなhas_manyで子供が保存されずにハマってた。親のsaveするタイミングでsaveさせるには、child = parent.children.first; child.awesome = true; parent.children << child
-
-
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.