Permalink
Browse files

Updated so rollback STEP=18 works, better at least

  • Loading branch information...
1 parent 598f85c commit d0b41f7c56b427d1f25e18bab7b2ce9445aaf39b @rocksolidwebdesign rocksolidwebdesign committed Apr 5, 2011
Showing with 15 additions and 5 deletions.
  1. +5 −5 db/migrate/20101217113425_translate_page_plugin.rb
  2. +10 −0 db/migrate/20110329222114_create_seo_meta.rb
View
10 db/migrate/20101217113425_translate_page_plugin.rb
@@ -1,12 +1,12 @@
class TranslatePagePlugin < ActiveRecord::Migration
def self.up
- PagePart.create_translation_table!({
+ ::PagePart.create_translation_table!({
:body => :text
}, {
:migrate_data => true
})
- Page.create_translation_table!({
+ ::Page.create_translation_table!({
:title => :string,
:meta_keywords => :string,
:meta_description => :text,
@@ -19,11 +19,11 @@ def self.up
load seed_file.to_s unless Page.where(:link_url => '/').any?
end
- Slug.update_all(:locale => ::I18n.locale)
+ ::Slug.update_all(:locale => ::I18n.locale)
end
def self.down
- Page.drop_translation_table! :migrate_data => true
- PagePart.drop_translation_table! :migrate_data => true
+ ::Page.drop_translation_table! :migrate_data => true
+ ::PagePart.drop_translation_table! :migrate_data => true
end
end
View
10 db/migrate/20110329222114_create_seo_meta.rb
@@ -66,6 +66,16 @@ def self.down
)
end
+ ::SeoMeta.attributes.keys.each do |k|
+ ::Page::Translation.module_eval %{
+ def #{k}
+ end
+
+ def #{k}=(*args)
+ end
+ }
+ end
+
drop_table :seo_meta
end

0 comments on commit d0b41f7

Please sign in to comment.