Rails Rake Task drop table and import from csv
问题 I am trying to write a rake task to drop a table and repopulate it from a csv. The intention is to obtain the data from another system on a schedule, and use a button in the admin interface of my rails application to import the new data. This new data will overwrite the old data in the table. I am not exactly sure how to do this so am playing around with rake tasks. So far I can import the new data but I can't figure out how to drop the table first. My code so far is: namespace