Created
September 19, 2012 21:46
-
-
Save lucasdavila/3752508 to your computer and use it in GitHub Desktop.
Rails I18n for nested attributes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 'pt-BR': | |
| activerecord: | |
| attributes: | |
| student: | |
| name: 'Nome' | |
| student_users: 'Usuários' | |
| # ... | |
| student/student_users: | |
| student_id: 'Código aluno' | |
| user_id: 'Código usuário' | |
| # ... | |
| errors: | |
| messages: | |
| taken: "já foi usado" | |
| # ... | |
| # Obs: | |
| # o modelo student has_many student_users | |
| # ao usar 'validates_uniqueness_of :user_id' no modelo student_user, a mensagem de erro será "Código usuário já foi usado" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment