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-0.6.5.1 db/migrate/014_rename_config_default_parts_key.rb
radiant-0.6.4 db/migrate/014_rename_config_default_parts_key.rb
radiant-0.6.5 db/migrate/014_rename_config_default_parts_key.rb
radiant-0.6.6 db/migrate/014_rename_config_default_parts_key.rb
radiant-0.6.7 db/migrate/014_rename_config_default_parts_key.rb
radiant-0.6.8 db/migrate/014_rename_config_default_parts_key.rb
radiant-0.6.9 db/migrate/014_rename_config_default_parts_key.rb
radiant-0.7.0 db/migrate/014_rename_config_default_parts_key.rb
radiant-0.7.1 db/migrate/014_rename_config_default_parts_key.rb
radiant-0.8.0 db/migrate/014_rename_config_default_parts_key.rb