Sha256: 9e95e225b916d435ce37a2aae5d39c0693bce26373762037d3da6caa380aa4ec
Contents?: true
Size: 478 Bytes
Versions: 53
Compression:
Stored size: 478 Bytes
Contents
class AssignContentHostToSmartProxies < ActiveRecord::Migration def up SmartProxy.reset_column_information SmartProxy.all.each do |proxy| content_host = ::Katello::System.where(:name => proxy.name).order("created_at DESC").first if content_host proxy.content_host_id = content_host.id proxy.save! end end end def down SmartProxy.all.each do |proxy| proxy.content_host_id = nil proxy.save! end end end
Version data entries
53 entries across 53 versions & 1 rubygems