diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-02-05 16:28:12 -0200 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-02-05 16:28:12 -0200 |
commit | 4b4e2281a08b827bbf997719bfe4a5b3085c3d68 (patch) | |
tree | a87c5d04a75e7465c8b4d62554ae8c3562ae3267 /actionview/lib | |
parent | 003c0cda26e3fa9c3362ac7e5b5faa6236b44aad (diff) | |
download | rails-4b4e2281a08b827bbf997719bfe4a5b3085c3d68.tar.gz rails-4b4e2281a08b827bbf997719bfe4a5b3085c3d68.tar.bz2 rails-4b4e2281a08b827bbf997719bfe4a5b3085c3d68.zip |
Rename method to make explicit its intention
call is too generic
Diffstat (limited to 'actionview/lib')
-rw-r--r-- | actionview/lib/action_view/helpers/tags/label.rb | 2 | ||||
-rw-r--r-- | actionview/lib/action_view/helpers/tags/placeholderable.rb | 2 | ||||
-rw-r--r-- | actionview/lib/action_view/helpers/tags/translator.rb | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/actionview/lib/action_view/helpers/tags/label.rb b/actionview/lib/action_view/helpers/tags/label.rb index 4159cb105f..b31d5fda66 100644 --- a/actionview/lib/action_view/helpers/tags/label.rb +++ b/actionview/lib/action_view/helpers/tags/label.rb @@ -18,7 +18,7 @@ module ActionView content ||= Translator .new(object, @object_name, method_and_value, scope: "helpers.label") - .call + .translate content ||= @method_name.humanize content diff --git a/actionview/lib/action_view/helpers/tags/placeholderable.rb b/actionview/lib/action_view/helpers/tags/placeholderable.rb index db16ea7b0b..cf7b117614 100644 --- a/actionview/lib/action_view/helpers/tags/placeholderable.rb +++ b/actionview/lib/action_view/helpers/tags/placeholderable.rb @@ -11,7 +11,7 @@ module ActionView placeholder ||= Tags::Translator .new(object, @object_name, method_and_value, scope: "helpers.placeholder") - .call + .translate placeholder ||= @method_name.humanize @options[:placeholder] = placeholder end diff --git a/actionview/lib/action_view/helpers/tags/translator.rb b/actionview/lib/action_view/helpers/tags/translator.rb index 86d7d21308..829679851c 100644 --- a/actionview/lib/action_view/helpers/tags/translator.rb +++ b/actionview/lib/action_view/helpers/tags/translator.rb @@ -9,7 +9,7 @@ module ActionView @model = object.respond_to?(:to_model) ? object.to_model : object end - def call + def translate translated_attribute = I18n.t("#{object_name}.#{method_and_value}", default: i18n_default, scope: scope).presence translated_attribute || human_attribute_name end |