Formatting

This commit is contained in:
Rico Sta. Cruz 2015-04-16 20:52:23 +08:00
parent 99bc4f69f4
commit e21f26a19c
1 changed files with 7 additions and 4 deletions

View File

@ -96,11 +96,13 @@ en:
## ActiveRecord ## ActiveRecord
### Models ### Model names
```rb ```rb
User.model_name.human #=> "User" User.model_name.human #=> "User"
Child.model_name.human(count: 2) #=> "Children" Child.model_name.human(count: 2) #=> "Children"
``` ```
{:.light}
```yml ```yml
en: en:
@ -129,7 +131,7 @@ en:
email: "Email" email: "Email"
``` ```
### Errors ### Error messages
```rb ```rb
error_messages_for(...) error_messages_for(...)
@ -171,7 +173,7 @@ validates
numericality - :not_a_number numericality - :not_a_number
``` ```
### Labels ### Form labels
```rb ```rb
form_for @post do form_for @post do
@ -187,12 +189,13 @@ helpers:
body: "Your body text" body: "Your body text"
``` ```
### Submit ### Submit buttons
```rb ```rb
form_for @post do form_for @post do
f.submit f.submit
``` ```
{:.light}
```yml ```yml
helpers: helpers: