diff options
author | Andrew DiMichele <backflip@gmail.com> | 2012-10-19 12:21:01 -0700 |
---|---|---|
committer | Andrew DiMichele <backflip@gmail.com> | 2012-10-19 17:36:34 -0700 |
commit | f48b7cc053a991404f973ca59dfede87ff6492db (patch) | |
tree | 773e469a6fd3ebeb1e1b1cf91dd115f0c8fbc1a7 /activerecord/lib/active_record/locale | |
parent | 2268859dafadebc054087751c4349225979550f1 (diff) | |
download | rails-f48b7cc053a991404f973ca59dfede87ff6492db.tar.gz rails-f48b7cc053a991404f973ca59dfede87ff6492db.tar.bz2 rails-f48b7cc053a991404f973ca59dfede87ff6492db.zip |
Changed scope for "taken" error message translation to decrease precedence
Moved activerecord.errors.messages.taken to errors.messages.taken so that translations for, e.g., errors.attributes.email.taken don't get overridden.
Test that the translation for 'taken' can be overridden
Diffstat (limited to 'activerecord/lib/active_record/locale')
-rw-r--r-- | activerecord/lib/active_record/locale/en.yml | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/locale/en.yml b/activerecord/lib/active_record/locale/en.yml index 896132d566..b1fbd38622 100644 --- a/activerecord/lib/active_record/locale/en.yml +++ b/activerecord/lib/active_record/locale/en.yml @@ -4,11 +4,15 @@ en: #created_at: "Created at" #updated_at: "Updated at" + # Default error messages + errors: + messages: + taken: "has already been taken" + # Active Record models configuration activerecord: errors: messages: - taken: "has already been taken" record_invalid: "Validation failed: %{errors}" restrict_dependent_destroy: one: "Cannot delete record because a dependent %{record} exists" |