added truncating blog_categories_blog_posts to reset_blog task

This commit is contained in:
Ivan Storck 2011-06-02 12:32:58 -07:00
parent 2dbf9d31b2
commit 49a49bbab8

View File

@ -5,7 +5,7 @@ namespace :wordpress do
task :reset_blog do task :reset_blog do
Rake::Task["environment"].invoke Rake::Task["environment"].invoke
%w(taggings tags blog_comments blog_categories blog_posts).each do |table_name| %w(taggings tags blog_comments blog_categories blog_categories_blog_posts blog_posts).each do |table_name|
p "Truncating #{table_name} ..." p "Truncating #{table_name} ..."
ActiveRecord::Base.connection.execute "DELETE FROM #{table_name}" ActiveRecord::Base.connection.execute "DELETE FROM #{table_name}"
end end