aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model/translation.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activemodel/lib/active_model/translation.rb')
-rw-r--r--activemodel/lib/active_model/translation.rb20
1 files changed, 7 insertions, 13 deletions
diff --git a/activemodel/lib/active_model/translation.rb b/activemodel/lib/active_model/translation.rb
index 0facbd6ce1..dbb76244e4 100644
--- a/activemodel/lib/active_model/translation.rb
+++ b/activemodel/lib/active_model/translation.rb
@@ -3,19 +3,19 @@ require 'active_support/core_ext/hash/reverse_merge'
module ActiveModel
# == Active Model Translation
- #
+ #
# Provides integration between your object and the Rails internationalization
# (i18n) framework.
- #
+ #
# A minimal implementation could be:
- #
+ #
# class TranslatedPerson
# extend ActiveModel::Translation
# end
- #
+ #
# TranslatedPerson.human_attribute_name('my_attribute')
# # => "My attribute"
- #
+ #
# This also provides the required class methods for hooking into the
# Rails internationalization API, including being able to define a
# class based i18n_scope and lookup_ancestors to find translations in
@@ -28,9 +28,9 @@ module ActiveModel
:activemodel
end
- # When localizing a string, it goes through the lookup returned by this
+ # When localizing a string, it goes through the lookup returned by this
# method, which is used in ActiveModel::Name#human,
- # ActiveModel::Errors#full_messages and
+ # ActiveModel::Errors#full_messages and
# ActiveModel::Translation#human_attribute_name.
def lookup_ancestors
self.ancestors.select { |x| x.respond_to?(:model_name) }
@@ -54,11 +54,5 @@ module ActiveModel
options.reverse_merge! :count => 1, :default => defaults
I18n.translate(defaults.shift, options)
end
-
- # Model.human_name is deprecated. Use Model.model_name.human instead.
- def human_name(*args)
- ActiveSupport::Deprecation.warn("human_name has been deprecated, please use model_name.human instead", caller[0,5])
- model_name.human(*args)
- end
end
end