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

feat: yield self in enable_writes! #77

Merged
merged 1 commit into from
Sep 10, 2024
Merged

Conversation

lukashlavacka
Copy link
Contributor

@lukashlavacka lukashlavacka commented Sep 9, 2024

Why

Common pattern that simplifies one-liner syntax like User.find(123).enable_writes! { |user| user.destroy! }

What changed

yield self when block is passed to #enable_writes!

@lukashlavacka lukashlavacka force-pushed the enable-writes-block-self branch from 4ee6cc3 to 811bd43 Compare September 9, 2024 13:56
@lukashlavacka lukashlavacka force-pushed the enable-writes-block-self branch from 811bd43 to 78b1c86 Compare September 9, 2024 18:21
@lukashlavacka lukashlavacka merged commit 6b891e8 into main Sep 10, 2024
8 checks passed
@lukashlavacka lukashlavacka deleted the enable-writes-block-self branch September 10, 2024 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants