Re-namespacing a bit to clear out some fairly old stuff from the top level
This commit is contained in:
25
oldstuff/map-mash/lib/tasks/maps.rake
Normal file
25
oldstuff/map-mash/lib/tasks/maps.rake
Normal file
@@ -0,0 +1,25 @@
|
||||
namespace :maps do
|
||||
desc 'Seed the maps!'
|
||||
task :seed => :environment do
|
||||
require 'app/models/map'
|
||||
|
||||
csv_filename = File.expand_path(
|
||||
'../../db/capital-cities.csv', File.dirname(__FILE__)
|
||||
)
|
||||
Map.import(csv_filename) do |map|
|
||||
puts "Seeded map '#{map.name}'"
|
||||
end
|
||||
end
|
||||
|
||||
desc 'Seed the maps a little bit less!'
|
||||
task :miniseed => :environment do
|
||||
require 'app/models/map'
|
||||
|
||||
csv_filename = File.expand_path(
|
||||
'../../db/top-us-cities.csv', File.dirname(__FILE__)
|
||||
)
|
||||
Map.import(csv_filename) do |map|
|
||||
puts "Seeded map '#{map.name}'"
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user