Sha256: f617b35c9c888c99c6603a44a76a05bb1ee03a997ee636b478a536aa9c4d06bd
Contents?: true
Size: 390 Bytes
Versions: 5
Compression:
Stored size: 390 Bytes
Contents
class MigrateInstallationMediumUri < ActiveRecord::Migration def self.up Medium.unscoped.all.each { |medium| matches = /^([^:]+):(\/.+)/.match(medium.path) if matches.size == 3 and ![ 'http', 'https', 'ftp', 'ftps', 'nfs' ].include?(matches[1]) medium.path = 'nfs://' + matches[1] + matches[2] medium.save end } end def self.down end end
Version data entries
5 entries across 5 versions & 1 rubygems