mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
AbstractController::Translation#t: dup options
This commit is contained in:
parent
607470c9b4
commit
341b5176c2
1 changed files with 1 additions and 0 deletions
|
@ -11,6 +11,7 @@ module AbstractController
|
||||||
# to translate many keys within the same controller / action and gives you a
|
# to translate many keys within the same controller / action and gives you a
|
||||||
# simple framework for scoping them consistently.
|
# simple framework for scoping them consistently.
|
||||||
def translate(key, options = {})
|
def translate(key, options = {})
|
||||||
|
options = options.dup
|
||||||
if key.to_s.first == "."
|
if key.to_s.first == "."
|
||||||
path = controller_path.tr("/", ".")
|
path = controller_path.tr("/", ".")
|
||||||
defaults = [:"#{path}#{key}"]
|
defaults = [:"#{path}#{key}"]
|
||||||
|
|
Loading…
Reference in a new issue