aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/abstract_controller/translation.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/abstract_controller/translation.rb')
-rw-r--r--actionpack/lib/abstract_controller/translation.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/actionpack/lib/abstract_controller/translation.rb b/actionpack/lib/abstract_controller/translation.rb
index 9e3858802a..666e154e4c 100644
--- a/actionpack/lib/abstract_controller/translation.rb
+++ b/actionpack/lib/abstract_controller/translation.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module AbstractController
module Translation
# Delegates to <tt>I18n.translate</tt>. Also aliased as <tt>t</tt>.
@@ -13,7 +15,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)