Remove i18n_variable for page_content

This commit is contained in:
Christophe Vilayphiou committed 2012-07-27 19:12:59 +08:00
1 parent 61c1af7316
commit 50813eb57d
7 files changed
+26 -11

No files matched your search

+15
View File
@@ -141,6 +141,21 @@ namespace :migrate do
end
p 'End NewsBulletinLink'
p '====================================================='
p '====================================================='
p 'Start PageContext'
page_contexts = PageContext.admin_manager_all
i = 1
page_contexts.each do |page_context|
p "#{i}/#{page_contexts.size} - #{page_context.id}"
context = I18nVariable.first(:conditions => {:language_value_id => page_context.id, :language_value_type => page_context.class})
page_context.context_translations = {'en' => context['en'], 'zh_tw' => context['zh_tw']} if context
page_context.save(:validate => false)
i += 1
end
p 'End PageContext'
end
end