Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: 7b5deacd8e
Fetching contributors…

Cannot retrieve contributors at this time

20 lines (19 sloc) 0.672 kB
# coding: UTF-8
namespace :cartodb do
namespace :prototypes do
desc 'Generates data for Madrid Clubbing prototype'
task :import_madrid_clubbing => :environment do
puts "Creating table 'Clubbing Madrid'"
puts "Importing the data..."
user = User[1]
table = Table.new :privacy => Table::PUBLIC, :name => 'Clubbing Madrid',
:tags => 'bars, madrid'
table.user_id = user.id
table.import_from_file = File.open("#{Rails.root}/db/fake_data/clubbing.csv", "r")
table.save
puts "Geocoding all this data..."
puts "Go go go!"
table.set_address_column!(:direccion_completa)
end
end
end
Jump to Line
Something went wrong with that request. Please try again.