Task part for i18n_variable removal for web_resource
This commit is contained in:
parent
207b0c5886
commit
327996a7b0
|
@ -173,6 +173,20 @@ namespace :migrate do
|
||||||
end
|
end
|
||||||
p 'End WebLink'
|
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
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue