Created
August 16, 2015 13:13
-
-
Save gorborukov/ecb44868e010c721db36 to your computer and use it in GitHub Desktop.
import hotels for Travelcore
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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