From 99bc4f69f4b40cbca85017cf1b701ff8b774d4b5 Mon Sep 17 00:00:00 2001 From: "Rico Sta. Cruz" Date: Thu, 16 Apr 2015 20:51:42 +0800 Subject: [PATCH] I18n: models --- rails-i18n.md | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/rails-i18n.md b/rails-i18n.md index 4ef2f841d..6b9a3d0a6 100644 --- a/rails-i18n.md +++ b/rails-i18n.md @@ -96,14 +96,11 @@ en: ## ActiveRecord -### Attributes - +### Models ```rb User.model_name.human #=> "User" Child.model_name.human(count: 2) #=> "Children" -User.human_attribute_for :name #=> "Name" ``` -{:.light} ```yml en: @@ -113,6 +110,18 @@ en: child: one: "Child" other: "Children" +``` + +### Attributes + +```rb +User.human_attribute_for :name #=> "Name" +``` +{:.light} + +```yml +en: + activerecord: attributes: user: # activerecord.attributes..