Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle updating nested has_one form #7

Closed
paulcsmith opened this issue Jun 22, 2018 · 1 comment · Fixed by #596
Closed

Handle updating nested has_one form #7

paulcsmith opened this issue Jun 22, 2018 · 1 comment · Fixed by #596
Assignees

Comments

@paulcsmith
Copy link
Member

Related to luckyframework/lucky_record#247 and #52

@paulcsmith
Copy link
Member Author

I think this one could be really tricky to get all the edge cases so I think I'll tackle this one

@paulcsmith paulcsmith self-assigned this Jul 2, 2018
@paulcsmith paulcsmith transferred this issue from luckyframework/lucky_record Feb 2, 2019
jwoertink pushed a commit that referenced this issue Jan 23, 2021
* Add `Avram::SaveOperation#new_record?`

`#persisted?` always returns `true` in `after_*` hooks, whether
a new record was created, or an existing one was updated.

This method should always return `true` for a create or `false`
for an update, independent of the stage we are at in the operation.

* Support updates for nested `.has_one` save operations

Resolves #7

* Add `.needs` support for nested `.has_one` save operations

* Revert "Add `.needs` support for nested `.has_one` save operations"

This reverts commit d7cb80a.

* Set foreign key in `after_save` callback

* Rename instance var
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant