Merge pull request #1 from SustainableWebsites/master
reset_blog task now truncates the blog_categories_blog_posts table
This commit is contained in:
		
						commit
						5c85ee2ec3
					
				@ -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
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user