debian-mirror-gitlab/app/models/concerns/delete_with_limit.rb

12 lines
191 B
Ruby
Raw Normal View History

2020-03-13 15:44:24 +05:30
# frozen_string_literal: true
module DeleteWithLimit
extend ActiveSupport::Concern
class_methods do
def delete_with_limit(maximum)
limit(maximum).delete_all
end
end
end