Do not show news/anc if no context.

This commit is contained in:
Matthew K. Fu JuYuan committed 2012-07-31 18:22:40 +08:00
1 parent 7e3b59c09a
commit b989f458d3
11 files changed
+102 -72

No files matched your search

+15
View File
@@ -44,4 +44,19 @@ namespace :data_migration do
sr.save!
end
task :make_bulletins_and_news_has_language_flag => :environment do
[Bulletin,NewsBulletin].each do |bulletin|
puts "="*10 + bulletin.to_s + "="*10
bulletin.all.each do |bt|
result = if (bt.save(:validate => false) rescue false )
"OK"
else
'Failed'
end
puts(bt.title+"----------#{result}")
end
end
puts("#{'='*10}Finished#{'='*10}")
end
end