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

Use ensure to revert @disable_ancestry_callbacks #566

Merged
merged 1 commit into from
Jan 5, 2022

Conversation

daniloisr
Copy link
Contributor

Hello, I ran into a problem because I need the return of the block passed to without_ancestry_callbacks:

# always returns false instead of the result of inner_block
def some_method
  without_ancestry_callbacks { inner_block } 
end

So I think that ensure is a good fit here.

Note, this is probably a breaking change (although I think no one is relying on the result of without_ancestry_callbacks right now), so should we create a new method for this?

Copy link
Collaborator

@kbrock kbrock left a comment

Choose a reason for hiding this comment

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

LGTM. just running the tests.

ping me if I do not merge this soon.

@kbrock
Copy link
Collaborator

kbrock commented Jan 5, 2022

kicking

@kbrock kbrock closed this Jan 5, 2022
@kbrock kbrock reopened this Jan 5, 2022
@kbrock kbrock merged commit 79abd33 into stefankroes:master Jan 5, 2022
kbrock added a commit to kbrock/ancestry that referenced this pull request Jun 10, 2022
* added strategy: materialized_path2 stefankroes#571
* Added tree_view method stefankroes#561 (thx @Bizcho)
* Fixed bug when errors would not undo callbacks stefankroes#566 (thx @daniloisr)
* ruby 3.0 support
* rails 7.0 support (thx @chenillen, @petergoldstein)
* Documentation fixes (thx @benkoshy, @mijoharas)
@kbrock kbrock mentioned this pull request Jun 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants