Task part for i18n_variable removal for web_resource
This commit is contained in:
parent
a1cf0a3eb6
commit
94337a58d5
|
@ -173,6 +173,20 @@ namespace :migrate do
|
|||
end
|
||||
p 'End WebLink'
|
||||
|
||||
p '====================================================='
|
||||
|
||||
p 'Start WebLinkCategory'
|
||||
categories = WebLinkCategory.admin_manager_all
|
||||
i = 1
|
||||
categories.each do |category|
|
||||
p "#{i}/#{categories.size} - #{category.id}"
|
||||
title = I18nVariable.first(:conditions => {:language_value_id => category.id, :language_value_type => category.class})
|
||||
category.title_translations = {'en' => title['en'], 'zh_tw' => title['zh_tw']} if title
|
||||
category.save(:validate => false)
|
||||
i += 1
|
||||
end
|
||||
p 'End WebLinkCategory'
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue