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

Adds #upsert_operation to figure out what happened #75

Merged
merged 3 commits into from
Jul 18, 2018

Conversation

benedikt
Copy link
Contributor

This pull request adds a new #upsert_operation method that allows to determine what happened in the last upsert call.

As this is mostly useful in callbacks, this pull-request also fixes a problem where attributes loaded from the database wouldn't be update until after the callbacks were called.

Additionally, it changes the way the attributes from the database are set on the model. It now uses a similar way as ActiveRecord itself.

Copy link
Collaborator

@olleolleolle olleolleolle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is elegant and kind: we can remove a long comment about Rails things which are no longer the case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants