mirror of https://github.com/rails/rails
No need to dup options hash where it's not modified
This commit is contained in:
parent
b65e43ab79
commit
8ebd6e5ccc
|
@ -11,8 +11,8 @@ module AbstractController
|
|||
# to translate many keys within the same controller / action and gives you a
|
||||
# simple framework for scoping them consistently.
|
||||
def translate(key, options = {})
|
||||
options = options.dup
|
||||
if key.to_s.first == "."
|
||||
options = options.dup
|
||||
path = controller_path.tr("/", ".")
|
||||
defaults = [:"#{path}#{key}"]
|
||||
defaults << options[:default] if options[:default]
|
||||
|
|
Loading…
Reference in New Issue