Sha256: b4ccc27c2bf4bcad563407bf03168cde6a8162d9729aa86bd2d5296613bcce8b
Contents?: true
Size: 339 Bytes
Versions: 39
Compression:
Stored size: 339 Bytes
Contents
require ::File.expand_path('../environment', __FILE__) require 'clockwork' include Clockwork every(1.day, 'revisions.assign', :at => '02:00') do date = Date.today list = ::Gateway.all.map{|x| x.librarize}.select{|x| x.requires_revision?} list.each do |x| Revision.create!(:gateway_id => x.gateway.id, :date => date) end end
Version data entries
39 entries across 39 versions & 1 rubygems