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

ActiveRecord model 'dup' modifies the original object. #2687

Closed
bblimke opened this issue Aug 18, 2023 · 2 comments
Closed

ActiveRecord model 'dup' modifies the original object. #2687

bblimke opened this issue Aug 18, 2023 · 2 comments

Comments

@bblimke
Copy link

bblimke commented Aug 18, 2023

There is an issue with AR model dup since version 3.0.0rc

my_ar_model[:image]
=> "image_689f742ca69d9d7b9b6aaed556f1f1e31ccc9a3a.JPG"
my_ar_model.dup
my_ar_model[:image]
=> nil

btw. is there a way to disable the current dup behaviour. I want to duplicate model but skip the duplication and upload of the file.

@mshibuya
Copy link
Member

Thank you for reporting, now fixed in the master.

@bblimke
Copy link
Author

bblimke commented Aug 19, 2023

Thank you @mshibuya !

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

No branches or pull requests

2 participants