You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So, there's a feature suggestion, it would be nice to allow passing a block to be yielded when there's a conflict not in Hash or Array lets say, as Rails deep_merge and Hash merge do. It could serve for things like doing calculations and such or allowing the decision to override a value to be done in other ways, in my use case, I wanted to sum one of the values.
I'll probably try coming up with a monkey patch for my purposes, I'll say already I'm very lazy but I could try coming up with a pull request, specially if the feature is desirable.
The text was updated successfully, but these errors were encountered:
Hey @salgadobreno - seems like a great idea (I'm the original author, but not the current maintainer). I believe I wrote this before that practice was standardized, so it would be great to bring this lib inline.
Then you'd need to track state of the merge with some new variable starting at that L78 above. Shouldn't be too tough, but deciding what is a conflict and what isn't will be a bit of a judgment call maybe, but I'd definitely encourage you to give it a try, and send a pull request here.. I think I have perms to approve PRs on Daniel's repo, so you can tag me or him to review.
Hi, thanks for the cool gem 8)
So, there's a feature suggestion, it would be nice to allow passing a block to be yielded when there's a conflict not in Hash or Array lets say, as Rails deep_merge and Hash merge do. It could serve for things like doing calculations and such or allowing the decision to override a value to be done in other ways, in my use case, I wanted to sum one of the values.
I'll probably try coming up with a monkey patch for my purposes, I'll say already I'm very lazy but I could try coming up with a pull request, specially if the feature is desirable.
The text was updated successfully, but these errors were encountered: