aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorVipul A M <vipulnsward@gmail.com>2017-06-15 01:06:04 +0530
committerVipul A M <vipulnsward@gmail.com>2017-06-15 01:06:04 +0530
commitff3c06f718a80c5d943e93e3cb1c784911d5c423 (patch)
tree034f9e3395af612d4e4073aec81227f46a5fc284 /actionpack/lib
parentdb7398f79f4dc30cefd6310b538073ec4a2574cc (diff)
downloadrails-ff3c06f718a80c5d943e93e3cb1c784911d5c423.tar.gz
rails-ff3c06f718a80c5d943e93e3cb1c784911d5c423.tar.bz2
rails-ff3c06f718a80c5d943e93e3cb1c784911d5c423.zip
Allow translate default option to accept an array similar to i18n.t. Fixes #29441
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/abstract_controller/translation.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/abstract_controller/translation.rb b/actionpack/lib/abstract_controller/translation.rb
index 9e3858802a..e4ac95df50 100644
--- a/actionpack/lib/abstract_controller/translation.rb
+++ b/actionpack/lib/abstract_controller/translation.rb
@@ -13,7 +13,7 @@ module AbstractController
path = controller_path.tr("/", ".")
defaults = [:"#{path}#{key}"]
defaults << options[:default] if options[:default]
- options[:default] = defaults
+ options[:default] = defaults.flatten
key = "#{path}.#{action_name}#{key}"
end
I18n.translate(key, options)