diff options
-rw-r--r-- | actionview/lib/action_view/helpers/tags/translator.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/actionview/lib/action_view/helpers/tags/translator.rb b/actionview/lib/action_view/helpers/tags/translator.rb index 42433caf36..243c287b2f 100644 --- a/actionview/lib/action_view/helpers/tags/translator.rb +++ b/actionview/lib/action_view/helpers/tags/translator.rb @@ -2,8 +2,6 @@ module ActionView module Helpers module Tags # :nodoc: class Translator # :nodoc: - attr_reader :object_name, :method_and_value, :i18n_scope, :model - def initialize(object, object_name, method_and_value, i18n_scope) @object_name = object_name.gsub(/\[(.*)_attributes\]\[\d+\]/, '.\1') @method_and_value = method_and_value @@ -16,6 +14,10 @@ module ActionView translated_attribute || human_attribute_name end + private + + attr_reader :object_name, :method_and_value, :i18n_scope, :model + def i18n_default if model key = model.model_name.i18n_key |