mailr/lib/tasks/clear_db.rake

11 lines
238 B
Ruby
Raw Normal View History

2011-07-29 20:05:47 +02:00
namespace :db do
2011-08-02 23:12:17 +02:00
desc "Clears all data in db"
2011-07-29 20:05:47 +02:00
task :clear_data => :environment do
users = User.all
puts "Number of users in db: #{users.size}"
puts "Deleting data....."
User.destroy_all
puts "Done"
end
end