2016-01-28 14:19:51 -06:00
|
|
|
namespace :usda do
|
|
|
|
|
|
|
|
desc 'Empties usda_foods table, imports all data, and then updates any linked ingredients'
|
|
|
|
task import: :environment do
|
|
|
|
importer = UsdaImporter.new(Rails.root.join('vendor', 'data', 'usda', 'ABBREV.txt'))
|
|
|
|
importer.import
|
|
|
|
end
|
|
|
|
end
|