Welcome to mirror list, hosted at ThFree Co, Russian Federation.

delete_with_limit.rb « concerns « models « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 1ea18b6149bac60f8284d47894224465b9d9996d (plain)
1
2
3
4
5
6
7
8
9
10
11
# frozen_string_literal: true

module DeleteWithLimit
  extend ActiveSupport::Concern

  class_methods do
    def delete_with_limit(maximum)
      limit(maximum).delete_all
    end
  end
end