Skip to content

Instantly share code, notes, and snippets.

@geocodinglife
Created August 16, 2019 03:12
Show Gist options
  • Save geocodinglife/20b9c002a7531f6f56f860c978c128ca to your computer and use it in GitHub Desktop.
Save geocodinglife/20b9c002a7531f6f56f860c978c128ca to your computer and use it in GitHub Desktop.
puts "Eliminado información de paises"
Country.delete_all
puts "Cargando datos de paises".red
countries = [
{id: 188, country_name: 'Afganistán', code: 'AF', country_status: false, phone_code: '+93', flag: 'AGO.png'},
{id: 355, country_name: 'Albania', code: 'AL', country_status: false, phone_code:'+355', flag: 'ALB.png'},
{id: 49, country_name: 'Alemania', code: 'DE', country_status: false, phone_code:'+49', flag: 'DEU.png'},
{id: 376, country_name: 'Andorra', code: 'AD', country_status: false, phone_code:'+376', flag: 'AND.png'},
{id: 244, country_name: 'Angola', code: 'AO', country_status: false, phone_code:'+244', flag: 'AGO.png'},
{id: 6, country_name: 'Anguilla', code: 'AI', country_status: false, phone_code:'+1-264', flag: 'AIA.png'},
{id: 127, country_name: 'Antártida', code: 'AQ', country_status: false, phone_code:'+672', flag: 'ATA.png'},
{id: 8, country_name: 'Antigua y Barbuda', code: 'AG', country_status: false, phone_code:'+1268', flag: 'ATG.png'},
{id: 599, country_name: 'Antillas Holandesas', code: 'AN', country_status: false, phone_code:'+599', flag: 'ANT.png'},
{id: 966, country_name: 'Arabia Saudita', code: 'SA', country_status: false, phone_code:'+966', flag: 'SAU.png'},
{id: 213, country_name: 'Argelia', code: 'DZ', country_status: false, phone_code:'+213' , flag: 'DZA.png'},
{id: 54, country_name: 'Argentina', code: 'AR', country_status: false, phone_code:'+54', flag: 'ARG.png'},
{id: 374, country_name: 'Armenia', code: 'AM', country_status: false, phone_code:'+374', flag: 'ARM.png'},
{id: 297, country_name: 'Aruba', code: 'AW', country_status: false, phone_code:'+297', flag: 'ABW.png'},
{id: 61, country_name: 'Australia', code: 'AU', country_status: false, phone_code:'+61', flag: 'AUS.png'},
{id: 43, country_name: 'Austria', code: 'AT', country_status: false, phone_code:'+43', flag: 'AUT.png'},
{id: 17, country_name: 'Azerbaiyán', code: 'AZ', country_status: false, phone_code:'+994', flag: 'AZE.png'},
{id: 18, country_name: 'Bahamas', code: 'BS', country_status: false, phone_code:'+1242', flag: 'BHS.png'},
{id: 973, country_name: 'Bahrein', code: 'BH', country_status: false, phone_code:'+973', flag: 'BHR.png'},
{id: 880, country_name: 'Bangladesh', code: 'BD', country_status: false, phone_code:'+880', flag: 'BGD.png'},
{id: 21, country_name: 'Barbados', code: 'BB', country_status: false, phone_code:'+1246', flag: 'BRB.png'},
{id: 32, country_name: 'Bélgica', code: 'BE', country_status: false, phone_code:'+32', flag: 'BEL.png'},
{id: 501, country_name: 'Belice', code: 'BZ', country_status: false, phone_code:'+501', flag: 'BLZ.png'},
{id: 229, country_name: 'Benín', code: 'BJ', country_status: false, phone_code:'+229', flag: 'BEN.png'},
{id: 25, country_name: 'Bermudas', code: 'BM', country_status: false, phone_code:'+1441', flag: 'BMU.png'},
{id: 975, country_name: 'Bhután', code: 'BT', country_status: false, phone_code:'+975', flag: 'BTN.png'},
{id: 27, country_name: 'Bielorrusia (Belarus)', code: 'BY', country_status: false, phone_code:'+375', flag: 'BLR.png'},
{id: 95, country_name: 'Birmania (Myanmar)', code: 'MM', country_status: false, phone_code:'+95', flag: '.png'},
{id: 591, country_name: 'Bolivia', code: 'BO', country_status: false, phone_code:'+591', flag: 'BOL.png'},
{id: 387, country_name: 'Bosnia y Herzegovina', code: 'BA', country_status: false, phone_code:'+378', flag: 'BIH.png'},
{id: 267, country_name: 'Botswana', code: 'BW', country_status: false, phone_code:'+267', flag: 'BWA.png'},
{id: 55, country_name: 'Brasil', code: 'BR', country_status: false, phone_code:'+55', flag: 'BRA.png'},
{id: 673, country_name: 'Brunei', code: 'BN', country_status: false, phone_code:'+673', flag: 'BRN.png'},
{id: 359, country_name: 'Bulgaria', code: 'BG', country_status: false, phone_code:'+359', flag: 'BGR.png'},
{id: 226, country_name: 'Burkina Faso', code: 'BF', country_status: false, phone_code:'+226', flag: 'BFA.png'},
{id: 257, country_name: 'Burundi', code: 'BI', country_status: false, phone_code:'+257', flag: 'BDI.png'},
{id: 238, country_name: 'Cabo Verde', code: 'CV', country_status: false, phone_code:'+238', flag: 'CPV.png'},
{id: 855, country_name: 'Camboya', code: 'KH', country_status: false, phone_code:'+855', flag: 'KHM.png'},
{id: 237, country_name: 'Camerún', code: 'CM', country_status: false, phone_code:'+237', flag: 'CMR.png'},
{id: 1, country_name: 'Canadá', code: 'CA', country_status: false, phone_code:'+1', flag: 'CAN.png'},
{id: 235, country_name: 'Chad', code: 'TD', country_status: false, phone_code:'+235', flag: 'TCD.png'},
{id: 56, country_name: 'Chile', code: 'CL', country_status: false, phone_code:'+56', flag: 'CHL.png'},
{id: 86, country_name: 'China', code: 'CN', country_status: false, phone_code:'+86', flag: 'CHN.png'},
{id: 357, country_name: 'Chipre', code: 'CY', country_status: false, phone_code:'+357', flag: 'CYP.png'},
{id: 44, country_name: 'Ciudad Estado del Vaticano (Santa Sede)', code: 'VA', country_status: false, phone_code:'+39', flag: '.png'},
{id: 57, country_name: 'Colombia', code: 'CO', country_status: true, phone_code:'+57', flag: 'COL.png'},
{id: 166, country_name: 'Comores (Comoro)', code: 'KM', country_status: false, phone_code:'+269', flag: 'COM.png'},
{id: 242, country_name: 'Congo', code: 'CG', country_status: false, phone_code:'+242', flag: 'COD.png'},
{id: 850, country_name: 'Corea del Norte', code: 'KP', country_status: false, phone_code:'+850', flag: 'PRK.png'},
{id: 82, country_name: 'Corea del Sur', code: 'KR', country_status: false, phone_code:'+82', flag: 'KOR.png'},
{id: 225, country_name: 'Costa de Marfil', code: 'CI', country_status: false, phone_code:'+225', flag: 'CMI.png'},
{id: 506, country_name: 'Costa Rica', code: 'CR', country_status: false, phone_code:'+506', flag: 'CRI.png'},
{id: 385, country_name: 'Croacia (Hrvatska)', code: 'HR', country_status: false, phone_code:'+385', flag: '.png'},
{id: 53, country_name: 'Cuba', code: 'CU', country_status: false, phone_code:'+53', flag: 'CUB.png'},
{id: 45, country_name: 'Dinamarca', code: 'DK', country_status: false, phone_code:'+45', flag: 'DNK.png'},
{id: 253, country_name: 'Djibouri', code: 'DJ', country_status: false, phone_code:'+253', flag: '.png'},
{id: 208, country_name: 'Dominica', code: 'DM', country_status: false, phone_code:'+1767', flag: 'DMA.png'},
{id: 593, country_name: 'Ecuador', code: 'EC', country_status: false, phone_code:'+593', flag: 'ECU.png'},
{id: 20, country_name: 'Egipto', code: 'EG', country_status: false, phone_code:'+20', flag: 'EGY.png'},
{id: 503, country_name: 'El Salvador', code: 'SV', country_status: false, phone_code:'+503', flag: '.png'},
{id: 96, country_name: 'Eritrea', code: 'ER', country_status: false, phone_code:'+291', flag: '.png'},
{id: 421, country_name: 'Eslovaquia', code: 'SK', country_status: false, phone_code:'+421', flag: '.png'},
{id: 386, country_name: 'Eslovenia', code: 'SI', country_status: false, phone_code:'+386', flag: 'ESP.png'},
{id: 34, country_name: 'España', code: 'ES', country_status: false, phone_code:'+34', flag: 'USA.png'},
{id: 147, country_name: 'Estados Unidos', code: 'US', country_status: false, phone_code:'+1', flag: '.png'},
{id: 372, country_name: 'Estonia', code: 'EE', country_status: false, phone_code:'+372', flag: 'EST.png'},
{id: 251, country_name: 'Etiopía', code: 'ET', country_status: false, phone_code:'+251', flag: 'ETH.png'},
{id: 69, country_name: 'Exrepública Yugoslava de Macedonia', code: 'MK', country_status: false, phone_code:'+389', flag: '.png'},
{id: 63, country_name: 'Filipinas', code: 'PH', country_status: false, phone_code:'+63', flag: '.png'},
{id: 358, country_name: 'Finlandia', code: 'FI', country_status: false, phone_code:'+358', flag: '.png'},
{id: 33, country_name: 'Francia', code: 'FR', country_status: false, phone_code:'+33', flag: '.png'},
{id: 241, country_name: 'Gabón', code: 'GA', country_status: false, phone_code:'+241', flag: 'GAB.png'},
{id: 220, country_name: 'Gambia', code: 'GM', country_status: false, phone_code:'+220', flag: 'GEO.png'},
{id: 995, country_name: 'Georgia', code: 'GE', country_status: false, phone_code:'+995', flag: '.png'},
{id: 76, country_name: 'Georgia del Sur y las Islas Sandwich del Sur', code: 'GS', country_status: false, phone_code:'+239', flag: '.png'},
{id: 233, country_name: 'Ghana', code: 'GH', country_status: false, phone_code:'+233', flag: 'GHA.png'},
{id: 350, country_name: 'Gibraltar', code: 'GI', country_status: false, phone_code:'+350', flag: '.png'},
{id: 79, country_name: 'Granada', code: 'GD', country_status: false, phone_code:'+1473', flag: '.png'},
{id: 30, country_name: 'Grecia', code: 'GR', country_status: false, phone_code:'+30', flag: 'GRC.png'},
{id: 299, country_name: 'Groenlandia', code: 'GL', country_status: false, phone_code:'+299', flag: 'GRD.png'},
{id: 590, country_name: 'Guadalupe', code: 'GP', country_status: false, phone_code:'+590', flag: '.png'},
{id: 83, country_name: 'Guam', code: 'GU', country_status: false, phone_code:'+1671', flag: '.png'},
{id: 502, country_name: 'Guatemala', code: 'GT', country_status: false, phone_code:'+502', flag: 'GTM.png'},
{id: 85, country_name: 'Guayana', code: 'GY', country_status: false, phone_code:'+592', flag: 'GUY.png'},
{id: 594, country_name: 'Guayana Francesa', code: 'GF', country_status: false, phone_code:'+594', flag: '.png'},
{id: 224, country_name: 'Guinea', code: 'GN', country_status: false, phone_code:'+224', flag: '.png'},
{id: 245, country_name: 'Guinea Bissau', code: 'GW', country_status: false, phone_code:'+245', flag: 'GNB.png'},
{id: 240, country_name: 'Guinea Ecuatorial', code: 'GQ', country_status: false, phone_code:'+240', flag: 'GNQ.png'},
{id: 509, country_name: 'Haití', code: 'HT', country_status: false, phone_code:'+509', flag: 'HTI.png'},
{id: 31, country_name: 'Holanda', code: 'NL', country_status: false, phone_code:'+31', flag: '.png'},
{id: 504, country_name: 'Honduras', code: 'HN', country_status: false, phone_code:'+504', flag: 'HND.png'},
{id: 852, country_name: 'Hong Kong R.A.E.', code: 'HK', country_status: false, phone_code:'+859', flag: '.png'},
{id: 36, country_name: 'Hungría', code: 'HU', country_status: false, phone_code:'+36', flag: 'HUN.png'},
{id: 91, country_name: 'India', code: 'IN', country_status: false, phone_code:'+91', flag: 'IND.png'},
{id: 62, country_name: 'Indonesia', code: 'ID', country_status: false, phone_code:'+62', flag: 'IDN.png'},
{id: 964, country_name: 'Irak', code: 'IQ', country_status: false, phone_code:'+964', flag: 'IRQ.png'},
{id: 98, country_name: 'Irán', code: 'IR', country_status: false, phone_code:'+98', flag: 'IRN.png'},
{id: 353, country_name: 'Irlanda', code: 'IE', country_status: false, phone_code:'+353', flag: 'IRL.png'},
{id: 100, country_name: 'Isla de Bouvet', code: 'BV', country_status: false, phone_code:'+0', flag: '.png'},
{id: 101, country_name: 'Isla de Christmas', code: 'CX', country_status: false, phone_code:'+0', flag: '.png'},
{id: 102, country_name: 'Isla Heard e Islas McDonald', code: 'HM', country_status: false, phone_code:'+0', flag: '.png'},
{id: 103, country_name: 'Isla Norfolk', code: 'NF', country_status: false, phone_code:'+0', flag: '.png'},
{id: 104, country_name: 'Isla Pitcairn', code: 'PN', country_status: false, phone_code:'+0', flag: '.png'},
{id: 354, country_name: 'Islandia', code: 'IS', country_status: false, phone_code:'+354', flag: 'ISL.png'},
{id: 106, country_name: 'Islas Caimán', code: 'KY', country_status: false, phone_code:'+1345', flag: '.png'},
{id: 107, country_name: 'Islas Cook', code: 'CK', country_status: false, phone_code:'+682', flag: '.png'},
{id: 108, country_name: 'Islas de Cocos o de Keeling', code: 'CC', country_status: false, phone_code:'+61 ', flag: '.png'},
{id: 109, country_name: 'Islas de Faroe', code: 'FO', country_status: false, phone_code:'+298', flag: '.png'},
{id: 110, country_name: 'Islas Fiyi (Fiji)', code: 'FJ', country_status: false, phone_code:'+679', flag: '.png'},
{id: 111, country_name: 'Islas Malvinas (Islas Falkland)', code: 'FK', country_status: false, phone_code:'+500', flag: '.png'},
{id: 112, country_name: 'Islas Marianas del Norte', code: 'MP', country_status: false, phone_code:'+1670', flag: '.png'},
{id: 113, country_name: 'Islas Marshall', code: 'MH', country_status: false, phone_code:'+0', flag: '.png'},
{id: 114, country_name: 'Islas Menores de Estados Unidos', code: 'UM', country_status: false, phone_code:'+692', flag: '.png'},
{id: 115, country_name: 'Islas Palau', code: 'PW', country_status: false, phone_code:'+680', flag: '.png'},
{id: 116, country_name: 'Islas Salomón', code: 'SB', country_status: false, phone_code:'+677', flag: '.png'},
{id: 117, country_name: 'Islas Tokelau', code: 'TK', country_status: false, phone_code:'+690', flag: '.png'},
{id: 118, country_name: 'Islas Turks y Caicos', code: 'TC', country_status: false, phone_code:'+1649', flag: '.png'},
{id: 119, country_name: 'Islas Vírgenes (Estados Unidos)', code: 'VI', country_status: false, phone_code:'+1340', flag: '.png'},
{id: 120, country_name: 'Islas Vírgenes (Reino Unido)', code: 'VG', country_status: false, phone_code:'+1284', flag: '.png'},
{id: 972, country_name: 'Israel', code: 'IL', country_status: false, phone_code:'+972', flag: 'ISR.png'},
{id: 39, country_name: 'Italia', code: 'IT', country_status: false, phone_code:'+39', flag: 'ITA.png'},
{id: 123, country_name: 'Jamaica', code: 'JM', country_status: false, phone_code:'+1876', flag: 'JAM.png'},
{id: 81, country_name: 'Japón', code: 'JP', country_status: false, phone_code:'+81', flag: 'JPN.png'},
{id: 962, country_name: 'Jordania', code: 'JO', country_status: false, phone_code:'+962', flag: 'JOR.png'},
{id: 7, country_name: 'Kazajstán', code: 'KZ', country_status: false, phone_code:'+7', flag: 'KAZ.png'},
{id: 254, country_name: 'Kenia', code: 'KE', country_status: false, phone_code:'+254', flag: 'KEN.png'},
{id: 996, country_name: 'Kirguizistán', code: 'KG', country_status: false, phone_code:'+996', flag: 'KGZ.png'},
{id: 686, country_name: 'Kiribati', code: 'KI', country_status: false, phone_code:'+686', flag: 'KIR.png'},
{id: 965, country_name: 'Kuwait', code: 'KW', country_status: false, phone_code:'+965', flag: 'KWT.png'},
{id: 856, country_name: 'Laos', code: 'LA', country_status: false, phone_code:'+856', flag: 'LAO.png'},
{id: 266, country_name: 'Lesotho', code: 'LS', country_status: false, phone_code:'+266', flag: '.png'},
{id: 371, country_name: 'Letonia', code: 'LV', country_status: false, phone_code:'+371', flag: '.png'},
{id: 961, country_name: 'Líbano', code: 'LB', country_status: false, phone_code:'+961', flag: 'LBN.png'},
{id: 231, country_name: 'Liberia', code: 'LR', country_status: false, phone_code:'+231', flag: 'LBR.png'},
{id: 218, country_name: 'Libia', code: 'LY', country_status: false, phone_code:'+218', flag: '.png'},
{id: 137, country_name: 'Liechtenstein', code: 'LI', country_status: false, phone_code:'+41', flag: 'LIE.png'},
{id: 370, country_name: 'Lituania', code: 'LT', country_status: false, phone_code:'+370', flag: 'LTU.png'},
{id: 352, country_name: 'Luxemburgo', code: 'LU', country_status: false, phone_code:'+352', flag: 'LUX.png'},
{id: 853, country_name: 'Macao R.A.E.', code: 'MO', country_status: false, phone_code:'+853', flag: 'MAC.png'},
{id: 261, country_name: 'Madagascar', code: 'MG', country_status: false, phone_code:'+261', flag: '.png'},
{id: 60, country_name: 'Malasia', code: 'MY', country_status: false, phone_code:'+60', flag: 'MYS.png'},
{id: 265, country_name: 'Malawi', code: 'MW', country_status: false, phone_code:'+265', flag: 'MWI.png'},
{id: 960, country_name: 'Maldivas', code: 'MV', country_status: false, phone_code:'+960', flag: 'MDV.png'},
{id: 223, country_name: 'Malí', code: 'ML', country_status: false, phone_code:'+223', flag: '.png'},
{id: 356, country_name: 'Malta', code: 'MT', country_status: false, phone_code:'+356', flag: '.png'},
{id: 212, country_name: 'Marruecos', code: 'MA', country_status: false, phone_code:'+212', flag: '.png'},
{id: 596, country_name: 'Martinica', code: 'MQ', country_status: false, phone_code:'+596', flag: '.png'},
{id: 230, country_name: 'Mauricio', code: 'MU', country_status: false, phone_code:'+0', flag: '.png'},
{id: 222, country_name: 'Mauritania', code: 'MR', country_status: false, phone_code:'+230', flag: 'MRT.png'},
{id: 269, country_name: 'Mayotte', code: 'YT', country_status: false, phone_code:'+269', flag: '.png'},
{id: 52, country_name: 'México', code: 'MX', country_status: false, phone_code:'+52', flag: 'MEX.png'},
{id: 691, country_name: 'Micronesia', code: 'FM', country_status: false, phone_code:'+691', flag: '.png'},
{id: 373, country_name: 'Moldavia', code: 'MD', country_status: false, phone_code:'+373', flag: '.png'},
{id: 377, country_name: 'Mónaco', code: 'MC', country_status: false, phone_code:'+377', flag: '.png'},
{id: 976, country_name: 'Mongolia', code: 'MN', country_status: false, phone_code:'+976', flag: '.png'},
{id: 157, country_name: 'Montserrat', code: 'MS', country_status: false, phone_code:'+1664', flag: '.png'},
{id: 258, country_name: 'Mozambique', code: 'MZ', country_status: false, phone_code:'+258', flag: '.png'},
{id: 264, country_name: 'Namibia', code: 'NA', country_status: false, phone_code:'+264', flag: '.png'},
{id: 674, country_name: 'Naurú', code: 'NR', country_status: false, phone_code:'+674', flag: '.png'},
{id: 977, country_name: 'Nepal', code: 'NP', country_status: false, phone_code:'+977', flag: '.png'},
{id: 505, country_name: 'Nicaragua', code: 'NI', country_status: false, phone_code:'+505', flag: 'NGA.png'},
{id: 227, country_name: 'Níger', code: 'NE', country_status: false, phone_code:'+227', flag: 'NER.png'},
{id: 234, country_name: 'Nigeria', code: 'NG', country_status: false, phone_code:'+234', flag: 'NGA.png'},
{id: 165, country_name: 'Niue', code: 'NU', country_status: false, phone_code:'+683', flag: '.png'},
{id: 47, country_name: 'Noruega', code: 'NO', country_status: false, phone_code:'+47', flag: 'NOR.png'},
{id: 687, country_name: 'Nueva Caledonia', code: 'NC', country_status: false, phone_code:'+687', flag: '.png'},
{id: 64, country_name: 'Nueva Zelanda', code: 'NZ', country_status: false, phone_code:'+64', flag: 'NZL.png'},
{id: 968, country_name: 'Omán', code: 'OM', country_status: false, phone_code:'+968', flag: 'OMN.png'},
{id: 92, country_name: 'Pakistán (Paquistán)', code: 'PK', country_status: false, phone_code:'+92', flag: '.png'},
{id: 507, country_name: 'Panamá', code: 'PA', country_status: false, phone_code:'+507', flag: 'PAK.png'},
{id: 675, country_name: 'Papua Nueva Guinea', code: 'PG', country_status: false, phone_code:'+675', flag: '.png'},
{id: 595, country_name: 'Paraguay', code: 'PY', country_status: false, phone_code:'+595', flag: 'PRY.png'},
{id: 51, country_name: 'Perú', code: 'PE', country_status: false, phone_code:'+51', flag: 'PER.png'},
{id: 689, country_name: 'Polinesia Francesa', code: 'PF', country_status: false, phone_code:'+689', flag: 'POL.png'},
{id: 48, country_name: 'Polonia', code: 'PL', country_status: false, phone_code:'+48', flag: '.png'},
{id: 351, country_name: 'Portugal', code: 'PT', country_status: false, phone_code:'+351', flag: '.png'},
{id: 178, country_name: 'Puerto Rico', code: 'PR', country_status: false, phone_code:'+1', flag: 'PRI.png'},
{id: 974, country_name: 'Qatar', code: 'QA', country_status: false, phone_code:'+974', flag: 'QAT.png'},
{id: 180, country_name: 'Reino Unido', code: 'UK', country_status: false, phone_code:'+44', flag: '.png'},
{id: 236, country_name: 'República Centroafricana', code: 'CF', country_status: false, phone_code:'+236', flag: '.png'},
{id: 420, country_name: 'República Checa', code: 'CZ', country_status: false, phone_code:'+420', flag: '.png'},
{id: 183, country_name: 'República de Sudáfrica', code: 'ZA', country_status: false, phone_code:'+27', flag: '.png'},
{id: 184, country_name: 'República Democrática del Congo (Zaire)', code: 'CD', country_status: false, phone_code:'+243', flag: '.png'},
{id: 185, country_name: 'República Dominicana', code: 'DO', country_status: false, phone_code:'+1809', flag: '.png'},
{id: 262, country_name: 'Reunión', code: 'RE', country_status: false, phone_code:'+262', flag: '.png'},
{id: 250, country_name: 'Ruanda', code: 'RW', country_status: false, phone_code:'+250', flag: 'RWA.png'},
{id: 40, country_name: 'Rumania', code: 'RO', country_status: false, phone_code:'+40', flag: 'ROM.png'},
{id: 189, country_name: 'Rusia', code: 'RU', country_status: false, phone_code:'+7', flag: 'RUS.png'},
{id: 192, country_name: 'Saint Kitts (San Cristóbal) y Nevis', code: 'KN', country_status: false, phone_code:'+1869', flag: '.png'},
{id: 684, country_name: 'Samoa', code: 'WS', country_status: false, phone_code:'+684', flag: '.png'},
{id: 685, country_name: 'Samoa Occidental', code: 'AS', country_status: false, phone_code:'+685', flag: '.png'},
{id: 378, country_name: 'San Marino', code: 'SM', country_status: false, phone_code:'+378', flag: '.png'},
{id: 194, country_name: 'San Pierre y Miquelon', code: 'PM', country_status: false, phone_code:'+508', flag: '.png'},
{id: 195, country_name: 'San Vicente e Islas Granadinas', code: 'VC', country_status: false, phone_code:'+1784', flag: '.png'},
{id: 290, country_name: 'Santa Helena', code: 'SH', country_status: false, phone_code:'+290', flag: '.png'},
{id: 197, country_name: 'Santa Lucía', code: 'LC', country_status: false, phone_code:'+1758', flag: '.png'},
{id: 239, country_name: 'Santo Tomé y Príncipe', code: 'ST', country_status: false, phone_code:'+239', flag: '.png'},
{id: 221, country_name: 'Senegal', code: 'SN', country_status: false, phone_code:'+221', flag: 'SEN.png'},
{id: 248, country_name: 'Seychelles', code: 'SC', country_status: false, phone_code:'+248', flag: '.png'},
{id: 232, country_name: 'Sierra Leona', code: 'SL', country_status: false, phone_code:'+232', flag: 'SLE.png'},
{id: 65, country_name: 'Singapur', code: 'SG', country_status: false, phone_code:'+65', flag: 'SGP.png'},
{id: 963, country_name: 'Siria', code: 'SY', country_status: false, phone_code:'+963', flag: '.png'},
{id: 252, country_name: 'Somalia', code: 'SO', country_status: false, phone_code:'+252', flag: '.png'},
{id: 94, country_name: 'Sri Lanka', code: 'LK', country_status: false, phone_code:'+94', flag: '.png'},
{id: 249, country_name: 'Sudán', code: 'SD', country_status: false, phone_code:'+249', flag: 'SDN.png'},
{id: 46, country_name: 'Suecia', code: 'SE', country_status: false, phone_code:'+46', flag: 'SWE.png'},
{id: 41, country_name: 'Suiza', code: 'CH', country_status: false, phone_code:'+41', flag: '.png'},
{id: 597, country_name: 'Surinam', code: 'SR', country_status: false, phone_code:'+597', flag: '.png'},
{id: 211, country_name: 'Svalbard e Islas Jan Mayen', code: 'SJ', country_status: false, phone_code:'+0', flag: '.png'},
{id: 268, country_name: 'Swazilandia', code: 'SZ', country_status: false, phone_code:'+268', flag: '.png'},
{id: 66, country_name: 'Tailandia', code: 'TH', country_status: false, phone_code:'+66', flag: '.png'},
{id: 11, country_name: 'Taiwán', code: 'TW', country_status: false, phone_code:'+886', flag: 'TWN.png'},
{id: 255, country_name: 'Tanzania', code: 'TZ', country_status: false, phone_code:'+255', flag: '.png'},
{id: 992, country_name: 'Tayikistán', code: 'TJ', country_status: false, phone_code:'+992', flag: '.png'},
{id: 150, country_name: 'Territorios Británicos del Océano Indico', code: 'IO', country_status: false, phone_code:'+0', flag: '.png'},
{id: 217, country_name: 'Territorios Franceses del Sur', code: 'TF', country_status: false, phone_code:'+0', flag: '.png'},
{id: 136, country_name: 'Timor Oriental', code: 'TP', country_status: false, phone_code:'+670', flag: 'TMP.png'},
{id: 228, country_name: 'Togo', code: 'TG', country_status: false, phone_code:'+228', flag: '.png'},
{id: 676, country_name: 'Tonga', code: 'TO', country_status: false, phone_code:'+676', flag: '.png'},
{id: 199, country_name: 'Trinidad y Tobago', code: 'TT', country_status: false, phone_code:'+1668', flag: 'TGO.png'},
{id: 216, country_name: 'Túnez', code: 'TN', country_status: false, phone_code:'+216', flag: 'TUN.png'},
{id: 145, country_name: 'Turkmenistán', code: 'TM', country_status: false, phone_code:'+993', flag: 'TKM.png'},
{id: 90, country_name: 'Turquía', code: 'TR', country_status: false, phone_code:'+90', flag: '.png'},
{id: 174, country_name: 'Tuvalú', code: 'TV', country_status: false, phone_code:'+688', flag: '.png'},
{id: 380, country_name: 'Ucrania', code: 'UA', country_status: false, phone_code:'+380', flag: '.png'},
{id: 256, country_name: 'Uganda', code: 'UG', country_status: false, phone_code:'+256', flag: 'UGA.png'},
{id: 971, country_name: 'Unión de Emiratos Árabes (Emiratos Árabes)', code: 'AE', country_status: false, phone_code:'+971', flag: '.png'},
{id: 598, country_name: 'Uruguay', code: 'UY', country_status: false, phone_code:'+598', flag: 'URY.png'},
{id: 998, country_name: 'Uzbekistán', code: 'UZ', country_status: false, phone_code:'+998', flag: 'UZB.png'},
{id: 678, country_name: 'Vanuatu', code: 'VU', country_status: false, phone_code:'+678', flag: '.png'}, {id: 58, country_name: 'Venezuela', code: 'VE', country_status: false, phone_code:'+58', flag: 'VEN.png'},
{id: 84, country_name: 'Vietnam', code: 'VN', country_status: false, phone_code:'+84', flag: 'VNM.png'},
{id: 681, country_name: 'Wallis e Islas Futuna', code: 'WF', country_status: false, phone_code:'+681', flag: '.png'},
{id: 967, country_name: 'Yemén (República del Yemén)', code: 'YE', country_status: false, phone_code:'+967', flag: 'WSM.png'},
{id: 381, country_name: 'Yugoslavia (Federación Yugoslava)', code: 'YU', country_status: false, phone_code:'+381', flag: '.png'},
{id: 260, country_name: 'Zambia', code: 'ZM', country_status: false, phone_code:'+260', flag: 'ZMB.png'},
{id: 263, country_name: 'Zimbabwe', code: 'ZW', country_status: false, phone_code:'+263', flag: 'ZMW.png'},
]
if Country.create!(countries)
puts "Paises creados".green
else
puts "A ocurrido un error".red
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment