Sha256: 7e613a729e61bf60034ab47d1baec1eb015a9046aa5890af6b2d8a0dbb6e827d

Contents?: true

Size: 382 Bytes

Versions: 1

Compression:

Stored size: 382 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 = Kajam::Config.find_by_key(from)
    setting.key = to
    setting.save!
  end
  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
kajam-1.0.3.rc2 db/migrate/014_rename_config_default_parts_key.rb