From 930ae906f2de646a5bd041e2880dfbafe6cfd90b Mon Sep 17 00:00:00 2001 From: johnnyshields <27655+johnnyshields@users.noreply.github.com> Date: Tue, 19 Sep 2023 03:25:02 +0900 Subject: [PATCH] Revert last commit --- lib/mongoid/slug.rb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/mongoid/slug.rb b/lib/mongoid/slug.rb index d0306b8..e934da0 100644 --- a/lib/mongoid/slug.rb +++ b/lib/mongoid/slug.rb @@ -112,10 +112,7 @@ def slug(*fields, &block) if __slug_paranoid_doc? # rubocop:disable Style/GuardClause set_callback :destroy, :after, :unset_slug! set_callback :restore, :before, :set_slug! - # TODO investigate if this should be used - # set_callback :save, :before, :clear_slug!, if: :slug_paranoid_deleted? - set_callback :save, :before, :reset_slug!, if: :paranoid_deleted? - set_callback :save, :after, :clear_slug!, if: :paranoid_deleted? + set_callback :save, :before, :clear_slug!, if: :slug_paranoid_deleted? end end