Sha256: 7dbedf1076cbf8a4bd70d01e5134e17031797968fdc85a2e21a0619424b1cd08

Contents?: true

Size: 245 Bytes

Versions: 6

Compression:

Stored size: 245 Bytes

Contents

if defined?(ActiveRecord::Base)
  module MiniScheduler
    class Stat < ActiveRecord::Base

      self.table_name = 'scheduler_stats'

      def self.purge_old
        where('started_at < ?', 1.months.ago).delete_all
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
mini_scheduler-0.10.0 app/models/mini_scheduler/stat.rb
mini_scheduler-0.9.2 app/models/mini_scheduler/stat.rb
mini_scheduler-0.9.1 app/models/mini_scheduler/stat.rb
mini_scheduler-0.9.0 app/models/mini_scheduler/stat.rb
mini_scheduler-0.8.3 app/models/mini_scheduler/stat.rb
mini_scheduler-0.8.2 app/models/mini_scheduler/stat.rb