Commit 62c50ad3 authored by Jan Provaznik's avatar Jan Provaznik

Fixed before_destroy callback

remove_file_uploads should be called both with and w/o
the flag - we need to decide which way to use on instance level.
parent 84eceb1f
...@@ -31,7 +31,7 @@ module WithUploads ...@@ -31,7 +31,7 @@ module WithUploads
# TODO: when feature flag is removed, we can use just dependent: destroy # TODO: when feature flag is removed, we can use just dependent: destroy
# option on :file_uploads # option on :file_uploads
before_destroy :remove_file_uploads, unless: :fast_destroy_enabled? before_destroy :remove_file_uploads
use_fast_destroy :file_uploads, if: :fast_destroy_enabled? use_fast_destroy :file_uploads, if: :fast_destroy_enabled?
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment