Sha256: 63878e5171889b89f519ccda47291c458f33789a8748b8c8b0bd992cb801aaf1

Contents?: true

Size: 394 Bytes

Versions: 21

Compression:

Stored size: 394 Bytes

Contents

class FixCanonicalServerUrl < ActiveRecord::Migration
  class Blog < ActiveRecord::Base
    include BareMigration
    serialize :settings, Hash
  end
  def self.up
    unless $schema_generator
      Blog.find(:all).each do |b|
        b.settings['canonical_server_url'] = b.settings['canonical_server_url'].to_s.gsub(%r{/$},'')
        b.save
      end
    end
  end

  def self.down
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
typo-5.5 db/migrate/051_fix_canonical_server_url.rb
typo-5.4.4 db/migrate/051_fix_canonical_server_url.rb
typo-5.4.3 db/migrate/051_fix_canonical_server_url.rb
typo-5.4.2 db/migrate/051_fix_canonical_server_url.rb
typo-5.4.1 db/migrate/051_fix_canonical_server_url.rb
typo-5.4 db/migrate/051_fix_canonical_server_url.rb
typo-4.1.1 db/migrate/051_fix_canonical_server_url.rb
typo-5.0.2 db/migrate/051_fix_canonical_server_url.rb
typo-5.0.1 db/migrate/051_fix_canonical_server_url.rb
typo-4.1 db/migrate/051_fix_canonical_server_url.rb
typo-5.0.3.98.1 db/migrate/051_fix_canonical_server_url.rb
typo-5.0.3.98 db/migrate/051_fix_canonical_server_url.rb
typo-5.0 db/migrate/051_fix_canonical_server_url.rb
typo-5.1.1 db/migrate/051_fix_canonical_server_url.rb
typo-5.1.2 db/migrate/051_fix_canonical_server_url.rb
typo-5.1.3 db/migrate/051_fix_canonical_server_url.rb
typo-5.1 db/migrate/051_fix_canonical_server_url.rb
typo-5.1.98 db/migrate/051_fix_canonical_server_url.rb
typo-5.2.98 db/migrate/051_fix_canonical_server_url.rb
typo-5.2 db/migrate/051_fix_canonical_server_url.rb