I18n: models
This commit is contained in:
parent
e7e5b75ba4
commit
99bc4f69f4
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue