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

Version 3.3.4 #128

Merged
merged 2 commits into from
Apr 4, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion lib/uploadcare/rails/active_record/mount_uploadcare_file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ def mount_uploadcare_file(attribute)
Uploadcare::FileApi.delete_file(file_uuid)
end

after_save "uploadcare_store_#{attribute}!".to_sym unless Uploadcare::Rails.configuration.do_not_store
unless Uploadcare::Rails.configuration.do_not_store
after_save "uploadcare_store_#{attribute}!".to_sym, if: "will_save_change_to_#{attribute}?".to_sym
end

return unless Uploadcare::Rails.configuration.delete_files_after_destroy

after_destroy "uploadcare_delete_#{attribute}!".to_sym
Expand Down