Skip to content

Instantly share code, notes, and snippets.

@gorborukov
Created August 16, 2015 13:13
Show Gist options
  • Save gorborukov/ecb44868e010c721db36 to your computer and use it in GitHub Desktop.
Save gorborukov/ecb44868e010c721db36 to your computer and use it in GitHub Desktop.
import hotels for Travelcore
require 'csv'
CSV.open('./public/russia_hotels.csv', 'r').each do |row|
Hotel.create(:ean_hotel_id => row[0],:name => row[1],:name_ru => row[2],:address=>row[3],:address_ru=>row[4],:city=>row[5],:city_ru=>row[6],:latitude=>row[8],:longitude=>row[9],:airport=>row[10],:nearby=>row[11],:nearby_ru=>row[12],:high_rate=>row[13],:low_rate=>row[14])
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment