-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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 keeps dirty after update #2702
Comments
Is this issue related to your problem? |
Maybe, not. We tried changing filename in every save, but the problem was reproduced. class FooUploader < CarrierWave::Uploader::Base
def filename
(Time.now.to_f * 1000).to_s + '.png'
end
end Here is additional information. foo = Foo.create!(image: File.open('oldfile.png'))
foo.update!(image: File.open('newfile.png'))
puts foo.changes
=> {"image"=>["1694578531581.793.png", "newfile.png"]} |
rajyan
added a commit
to rajyan/carrierwave
that referenced
this issue
Sep 13, 2023
rajyan
added a commit
to rajyan/carrierwave
that referenced
this issue
Sep 13, 2023
Thank you for the detailed information! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
this problem occurs since 3.0.0.rc to 3.0.3
only if filename method is defined in uploader
and saved outside transactions (if saved inside transactions, we get 'false')
Are there any workarounds or required settings?
The text was updated successfully, but these errors were encountered: