aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model/translation.rb
diff options
context:
space:
mode:
authorRizwan Reza <rizwanreza@gmail.com>2010-06-14 13:56:51 +0430
committerRizwan Reza <rizwanreza@gmail.com>2010-06-14 13:56:51 +0430
commit7d7d54fa1fd000703f142a6b44f4e6f264a35270 (patch)
tree600225e04ed7f25eca8d2f337dca977c3062bb6a /activemodel/lib/active_model/translation.rb
parent2572af11cef1649ff9c8d38fbd2d68a8a5254d04 (diff)
downloadrails-7d7d54fa1fd000703f142a6b44f4e6f264a35270.tar.gz
rails-7d7d54fa1fd000703f142a6b44f4e6f264a35270.tar.bz2
rails-7d7d54fa1fd000703f142a6b44f4e6f264a35270.zip
Revised the rest of the files from ActiveModel.
Diffstat (limited to 'activemodel/lib/active_model/translation.rb')
-rw-r--r--activemodel/lib/active_model/translation.rb16
1 files changed, 10 insertions, 6 deletions
diff --git a/activemodel/lib/active_model/translation.rb b/activemodel/lib/active_model/translation.rb
index 2ab342ffac..3228cfed9a 100644
--- a/activemodel/lib/active_model/translation.rb
+++ b/activemodel/lib/active_model/translation.rb
@@ -1,9 +1,11 @@
require 'active_support/core_ext/hash/reverse_merge'
module ActiveModel
-
- # ActiveModel::Translation provides integration between your object and
- # the Rails internationalization (i18n) framework.
+
+ # == Active Model Translation
+ #
+ # Provides integration between your object and the Rails internationalization
+ # (i18n) framework.
#
# A minimal implementation could be:
#
@@ -26,14 +28,16 @@ module ActiveModel
:activemodel
end
- # When localizing a string, goes through the lookup returned by this method.
- # Used in ActiveModel::Name#human, ActiveModel::Errors#full_messages and
+ # 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::Translation#human_attribute_name.
def lookup_ancestors
self.ancestors.select { |x| x.respond_to?(:model_name) }
end
- # Transforms attributes names into a more human format, such as "First name" instead of "first_name".
+ # Transforms attribute names into a more human format, such as "First name"
+ # instead of "first_name".
#
# Person.human_attribute_name("first_name") # => "First name"
#