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

Allow merge to have block #71

Closed
wants to merge 1 commit into from

Conversation

JensMeire
Copy link

Allow merge with block, this allows nested data to be merged on the same level.

Copy link
Member

@adamcrown adamcrown left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. The implementation certainly looks simple enough, but I'm a bit confused about the use case. See my inline comments.

Comment on lines +37 to +39
merge :itself, with: AddressSerializer do |model, _options|
model.address
end
Copy link
Member

Choose a reason for hiding this comment

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

Could you explain the advantage of doing this over just using the attribute directly as described below?

merge :address, with: AddressSerializer

@adamcrown
Copy link
Member

NOTE: I'm rebasing against main to pull in the new CI checks. You may need to re-pull your local branches.

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