diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-02-05 16:20:39 -0200 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-02-05 16:20:39 -0200 |
commit | 44e1cda314cc562f6432f30d0064759c2fdc39b5 (patch) | |
tree | e22d5293ac367893d04cc3f9498284c38538aa16 | |
parent | 0caac9bf9b58f29f474675c18366413364df87c1 (diff) | |
download | rails-44e1cda314cc562f6432f30d0064759c2fdc39b5.tar.gz rails-44e1cda314cc562f6432f30d0064759c2fdc39b5.tar.bz2 rails-44e1cda314cc562f6432f30d0064759c2fdc39b5.zip |
Change the method visibility
Thse methods are used only inside this class
-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 |