From a8e2b0a8399a4b1c94ec1e66670941ed79cf3f10 Mon Sep 17 00:00:00 2001 From: Charley DAVID Date: Thu, 18 May 2017 13:19:18 -0300 Subject: [PATCH] Simpler country names --- app/controllers/application_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index e298cb0..20d1710 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -37,7 +37,7 @@ def best_deals lowest = games.flat_map(&:prices).min_by { |price| price.value.exchange_to('USD') } next if !lowest.present? rates = currencies.map { |c| lowest.value.exchange_to(c) } - rows << [game.title, lowest.country].concat(rates) + rows << [game.title, ISO3166::Country[lowest.country].translation('en')].concat(rates) end end @@ -72,7 +72,7 @@ def glossary countries.each do |code| country = ISO3166::Country[code] - rows << [code, country.name, country.currency.iso_code, country.currency.name] + rows << [code, country.translation('en'), country.currency.iso_code, country.currency.name] end rows << []