I18n: models

This commit is contained in:
Rico Sta. Cruz 2015-04-16 20:51:42 +08:00
parent e7e5b75ba4
commit 99bc4f69f4
1 changed files with 13 additions and 4 deletions

View File

@ -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.<model>.<field>