Sha256: dcc27a09b79d3bdaeda39b39deb9e9b77fe4626c0fd34935cc473ac84eb4af3c
Contents?: true
Size: 632 Bytes
Versions: 8
Compression:
Stored size: 632 Bytes
Contents
class RenameJobCategories < ActiveRecord::Migration MAP = { 'Package Action - SSH Default' => ['Package Action', 'Packages'], 'Puppet Run Once - SSH Default' => ['Puppet Run Once', 'Puppet'], 'Run Command - SSH Default' => ['Run Command', 'Commands'], 'Service Action - SSH Default' => ['Service Action', 'Services'], }.freeze def up MAP.each do |name, transition| JobTemplate.where(:name => name).update_all(:job_name => transition.last) end end def down MAP.each do |name, transition| JobTemplate.where(:name => name).update_all(:job_name => transition.first) end end end
Version data entries
8 entries across 8 versions & 1 rubygems