Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Fixes a problem with dup and instance variables #352
Fixes a problem where after dup the dup'd model and the original model share a translation instance, which means that if you mutate a translated field on the dup and save it, the original becomes a clone of the dup.
We were running in to this in our efforts to use spree, so there's at least one major implementation that is effected.
Thanks in advance!
referenced this pull request
May 29, 2014
Thanks a lot!
Just to give further feedback about this, I bumped to this PR in the app I'm working with (which makes an extensive use of globalize and friendly_id) and everything worked out correctly. Didn't see any colateral issues by applying it. I'll try to think about this issue on myself during the weekend to see if I can come up with something, because although it fixes the issue I'm not sure if it's the right thing to clear the memoized value here or a refactor is needed not to share the adapter (I'm a newbie with globalize so maybe this PR is actually the way to go, just not sure).
Let me know if I can help with something, thanks again!
added a commit
this pull request
Nov 16, 2014
@parndt I don't think so, but to be honest I'm not very familiar with this libraries codebase. Only changes that look potentially bad are these Thread changes v4.0.2...masterdiff-0df2502195bd5448967f47dc781b4b96L55 but I'm not really clear on the context of it.