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

Dup does not dup translations (KeyValue backend) #123

Closed
shioyama opened this issue Dec 2, 2017 · 1 comment
Closed

Dup does not dup translations (KeyValue backend) #123

shioyama opened this issue Dec 2, 2017 · 1 comment

Comments

@shioyama
Copy link
Owner

shioyama commented Dec 2, 2017

#84 fixed this issue for the Table backend, but it is still broken for the KeyValue backend.

Context

dup does not duplicate translations. Suppose we have:

post = Post.new
post.title = "foo"
post.save
post.title
#=> "foo"
post_dup = post.dup

Expected Behavior

The title of the dup'ed post should be "foo":

post_dup.title
#=> "foo"

Actual Behavior

The title is nil, because the translations are not dup'ed:

post_dup.title
#=> nil

There is already a spec for this which is disabled for KeyValue backends (AR + Sequel), so if someone works on this, just remove that skip code and make the test pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant