diff --git a/lib/tasks/migrate.rake b/lib/tasks/migrate.rake index 77a200b8..74f8df8c 100644 --- a/lib/tasks/migrate.rake +++ b/lib/tasks/migrate.rake @@ -362,7 +362,7 @@ namespace :migrate do i = 1 news_bulletins.each do |news| p "#{i}/#{news_bulletins.size} - #{news.id}" - news.subtitle.gsub!(/^\
/, '').gsub!(/\<\/p\>$/, '') rescue nil + news.subtitle_translations = {'en' => (news.subtitle_translations['en'].gsub(/^\
/, '').gsub(/\<\/p\>$/, '') rescue ''), 'zh_tw' => (news.subtitle_translations['zh_tw'].gsub(/^\
/, '').gsub(/\<\/p\>$/, '') rescue nil)} p news.save(:validate => false) if news.changed? i += 1 end if news_bulletins