aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view/helpers/tags/translator.rb
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2016-08-06 19:55:02 +0200
committerXavier Noria <fxn@hashref.com>2016-08-06 20:16:27 +0200
commit80e66cc4d90bf8c15d1a5f6e3152e90147f00772 (patch)
treee7e75464af04f3cf1935b29238dbd7cb2337b0dd /actionview/lib/action_view/helpers/tags/translator.rb
parent411ccbdab2608c62aabdb320d52cb02d446bb39c (diff)
downloadrails-80e66cc4d90bf8c15d1a5f6e3152e90147f00772.tar.gz
rails-80e66cc4d90bf8c15d1a5f6e3152e90147f00772.tar.bz2
rails-80e66cc4d90bf8c15d1a5f6e3152e90147f00772.zip
normalizes indentation and whitespace across the project
Diffstat (limited to 'actionview/lib/action_view/helpers/tags/translator.rb')
-rw-r--r--actionview/lib/action_view/helpers/tags/translator.rb24
1 files changed, 12 insertions, 12 deletions
diff --git a/actionview/lib/action_view/helpers/tags/translator.rb b/actionview/lib/action_view/helpers/tags/translator.rb
index 8b6655481d..62b1df81c6 100644
--- a/actionview/lib/action_view/helpers/tags/translator.rb
+++ b/actionview/lib/action_view/helpers/tags/translator.rb
@@ -16,24 +16,24 @@ module ActionView
protected
- attr_reader :object_name, :method_and_value, :scope, :model
+ attr_reader :object_name, :method_and_value, :scope, :model
private
- def i18n_default
- if model
- key = model.model_name.i18n_key
- ["#{key}.#{method_and_value}".to_sym, ""]
- else
- ""
+ def i18n_default
+ if model
+ key = model.model_name.i18n_key
+ ["#{key}.#{method_and_value}".to_sym, ""]
+ else
+ ""
+ end
end
- end
- def human_attribute_name
- if model && model.class.respond_to?(:human_attribute_name)
- model.class.human_attribute_name(method_and_value)
+ def human_attribute_name
+ if model && model.class.respond_to?(:human_attribute_name)
+ model.class.human_attribute_name(method_and_value)
+ end
end
- end
end
end
end