debian-mirror-gitlab/app/models/concerns/delete_with_limit.rb
2020-03-13 15:44:24 +05:30

11 lines
191 B
Ruby

# frozen_string_literal: true
module DeleteWithLimit
extend ActiveSupport::Concern
class_methods do
def delete_with_limit(maximum)
limit(maximum).delete_all
end
end
end