-
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
Update Callback Documentation #2717
Conversation
README.md
Outdated
def log_removal | ||
::Rails.logger.info(format('Deleting file on S3: %s', @file)) | ||
def log_removal(file) | ||
::Rails.logger.info(format('Deleting file on S3: %s', file)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please clarify what sort of a problem this is trying to address.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mshibuya
Sorry for not explaining.
The reason I changed the argument was because an ArgmentError occurred.
F, [2024-01-07T18:02:54.020568 #88960] FATAL -- :
ArgumentError (wrong number of arguments (given 1, expected 0)):
app/uploaders/XXX_uploader.rb:14:in `log_retrieve_from_store'
carrierwave (2.2.2) lib/carrierwave/uploader/callbacks.rb:16:in `block in with_callbacks'
carrierwave (2.2.2) lib/carrierwave/uploader/callbacks.rb:16:in `each'
carrierwave (2.2.2) lib/carrierwave/uploader/callbacks.rb:16:in `with_callbacks'
carrierwave (2.2.2) lib/carrierwave/uploader/store.rb:86:in `retrieve_from_store!'
carrierwave (2.2.2) lib/carrierwave/uploader/versions.rb:327:in `block in retrieve_versions_from_store!'
carrierwave (2.2.2) lib/carrierwave/uploader/versions.rb:327:in `each'
carrierwave (2.2.2) lib/carrierwave/uploader/versions.rb:327:in `retrieve_versions_from_store!'
carrierwave (2.2.2) lib/carrierwave/uploader/callbacks.rb:16:in `block in with_callbacks'
carrierwave (2.2.2) lib/carrierwave/uploader/callbacks.rb:16:in `each'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The retrieve_from_store callback takes an argument,
carrierwave/lib/carrierwave/uploader/store.rb
Line 104 in 20c6d75
with_callbacks(:retrieve_from_store, identifier) do |
but the remove callback doesn't.
with_callbacks(:remove) do |
So this change will break, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks to your explanation, I have completely understood...
I have canceled it 🙇
Thanks 👍 |
No description provided.