Sha256: d714ca45e71a6e96aead64811369e6edecacb5373628ca051d6a059ca52f5603

Contents?: true

Size: 831 Bytes

Versions: 1

Compression:

Stored size: 831 Bytes

Contents

class PageI18nName < ActiveRecord::Migration
  def self.up
    # begin
    #   add_column :page_translations, :title_for_url, :string
    #   Humpyard::Page.reset_column_information
    # 
    #   rename_column :page_translations, :"#{Humpyard::config.table_name_prefix}page_id", :page_id
    #  Humpyard::Page.all.each do       | p      |
    #  Humpyard::config.locales.each do | locale |
    #       I18n.locale = locale
    #       p.title_for_url = p.suggested_title_for_url
    #       p.save
    #     end
    #   end
    #   I18n.locale = Humpyard::config.locales.first
    #   rename_column :page_translations, :page_id, :"#{Humpyard::config.table_name_prefix}page_id"
    #   remove_column :pages, :name, :string
    #   Humpyard::Page.reset_column_information
    # rescue
    # end

  end
  
  def self.down

  end 
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
humpyard-0.0.1 db/migrate/20100415193423_page_i18n_name.rb