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