Merge pull request #1 from SustainableWebsites/master

reset_blog task now truncates the blog_categories_blog_posts table
This commit is contained in:
Marc Remolt 2011-06-02 13:04:49 -07:00
commit 5c85ee2ec3

View File

@ -5,7 +5,7 @@ namespace :wordpress do
task :reset_blog do
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} ..."
ActiveRecord::Base.connection.execute "DELETE FROM #{table_name}"
end