Browse files

add locale to slugs before creating the translations.

  • Loading branch information...
1 parent 302ae90 commit ac7efd227f041e2b196805e40a338aad73c11cde @parndt parndt committed Dec 29, 2010
View
15 db/migrate/20101214040815_translate_page_plugin.rb
@@ -1,15 +0,0 @@
-class TranslatePagePlugin < ActiveRecord::Migration
- def self.up
- Page.create_translation_table! :title => :string,
- :meta_keywords => :string,
- :meta_description => :text,
- :browser_title => :string
-
- PagePart.create_translation_table! :body => :text
- end
-
- def self.down
- Page.drop_translation_table!
- PagePart.drop_translation_table!
- end
-end
View
23 db/migrate/20101217113425_translate_page_plugin.rb
@@ -0,0 +1,23 @@
+class TranslatePagePlugin < ActiveRecord::Migration
+ def self.up
+ Page.create_translation_table!({
+ :title => :string,
+ :meta_keywords => :string,
+ :meta_description => :text,
+ :browser_title => :string
+ }, {
+ :migrate_data => true
+ })
+
+ PagePart.create_translation_table!({
+ :body => :text
+ }, {
+ :migrate_data => true
+ })
+ end
+
+ def self.down
+ Page.drop_translation_table!
+ PagePart.drop_translation_table!
+ end
+end
View
2 refinerycms.gemspec
@@ -75,9 +75,9 @@ Gem::Specification.new do |s|
'db/migrate/20100926142529_add_value_type_to_refinery_settings.rb',
'db/migrate/20100929035252_add_missing_indexes_to_roles_users.rb',
'db/migrate/20101006211228_remove_image_thumbnails_from_refinery_settings.rb',
- 'db/migrate/20101214040815_translate_page_plugin.rb',
'db/migrate/20101216194133_remove_cached_slug_from_pages.rb',
'db/migrate/20101217113424_add_locale_to_slugs.rb',
+ 'db/migrate/20101217113425_translate_page_plugin.rb',
'db/seeds',
'db/seeds.rb',
'db/seeds/pages.rb',

0 comments on commit ac7efd2

Please sign in to comment.