This project is archived and is in readonly mode.
autosave generates error when one-to-one association is empty after being accessed.
-
Gaspard Bucher
I could reproduce your example => same error.
I tried to reproduce it with the patch for #1930 autosave should validate associations even if master is invalid (better validations for autosave) => no error.
The last patch solves your problem: #1930 autosave should validate associations even if master is invalid.
-
pete_lacey
Gaspard,
Thanks! I thought that patch would help too, and tried it before reporting. Unfortunately, it's mutually incompatible right now (from a Git point of view at least) with the patch for #1892 nested attributes should not have meaningful hash keys which I also need. So I was unable to apply it. I guess I'll wait for both patches to be rebased and committed to trunk. Maybe there's another way, but I'm a Git newb.
Thanks again.
-
pete_lacey
Final note. I got a little smarter about Git and was able to apply both patches. I can now confirm this works and works in conjunction with nested attributes.
Thanks, Gaspard.
-
Eloy Duran
- Assigned user set to Eloy Duran
-
Michael Koziarski
- State changed from new to resolved
Duplicate of #1930 autosave should validate associations even if master is invalid if that patch fixes it