Sha256: 80d345f3ce89d227bb88d1d46dfc4cc45320a407984366be535594bee0604206

Contents?: true

Size: 384 Bytes

Versions: 50

Compression:

Stored size: 384 Bytes

Contents

class RenameConfigDefaultPartsKey < ActiveRecord::Migration
  
  def self.up
    rename_config_key 'default.parts', 'defaults.page.parts'
  end

  def self.down
    rename_config_key 'defaults.page.parts', 'default.parts'
  end
  
  def self.rename_config_key(from, to)
    return unless setting = Radiant::Config.find_by_key(from)
    setting.key = to
    setting.save!
  end
  
end

Version data entries

50 entries across 50 versions & 4 rubygems

Version Path
radiant-1.1.4 db/migrate/014_rename_config_default_parts_key.rb
radiant-1.1.3 db/migrate/014_rename_config_default_parts_key.rb
radiant-1.1.2 db/migrate/014_rename_config_default_parts_key.rb
radiant-1.1.1 db/migrate/014_rename_config_default_parts_key.rb
radiant-1.1.0 db/migrate/014_rename_config_default_parts_key.rb
radiant-1.1.0.rc1 db/migrate/014_rename_config_default_parts_key.rb
radiant-1.1.0.beta db/migrate/014_rename_config_default_parts_key.rb
radiant-1.0.1 db/migrate/014_rename_config_default_parts_key.rb
radiant-1.1.0.alpha db/migrate/014_rename_config_default_parts_key.rb
radiant-1.0.0 db/migrate/014_rename_config_default_parts_key.rb
radiant-1.0.0.rc5 db/migrate/014_rename_config_default_parts_key.rb
radiant-1.0.0.rc4 db/migrate/014_rename_config_default_parts_key.rb
radiant-1.0.0.rc3 db/migrate/014_rename_config_default_parts_key.rb
radiant-1.0.0.rc2 db/migrate/014_rename_config_default_parts_key.rb
radiant-1.0.0.rc1 db/migrate/014_rename_config_default_parts_key.rb
radiant-rails3-0.1 db/migrate/014_rename_config_default_parts_key.rb
radiantcms-couchrest_model-0.2.4 db/migrate/014_rename_config_default_parts_key.rb
radiantcms-couchrest_model-0.2.2 db/migrate/014_rename_config_default_parts_key.rb
radiantcms-couchrest_model-0.2.1 db/migrate/014_rename_config_default_parts_key.rb
radiantcms-couchrest_model-0.2 db/migrate/014_rename_config_default_parts_key.rb