From 7e9412ee151332c9ae6594a85f1bd09f396a70f7 Mon Sep 17 00:00:00 2001 From: camelmasa Date: Tue, 12 Aug 2014 17:32:05 +0900 Subject: [PATCH] Fix I18n::ArgumentError occur error when text is blank (not nil) --- app/controllers/spree/checkout_controller_decorator.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/spree/checkout_controller_decorator.rb b/app/controllers/spree/checkout_controller_decorator.rb index a08c1d7..2560ec8 100644 --- a/app/controllers/spree/checkout_controller_decorator.rb +++ b/app/controllers/spree/checkout_controller_decorator.rb @@ -452,7 +452,7 @@ def gateway_error(response) if I18n.locale == :en text = "#{I18n.t('gateway_error')}: #{text}" - else + elsif !text.blank? # Parameterize text for i18n key text = text.parameterize(sep = '_') text = "#{I18n.t('gateway_error')}: #{I18n.t(text)}"