diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-10-19 17:39:58 -0700 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-10-19 17:39:58 -0700 |
commit | 5341b84936d93ec90e6252af437a3871101c115a (patch) | |
tree | 40975e0b1c248cbad27837fc3b3c7b4eca05612a /activerecord/test | |
parent | c50de96200da6a507c96891f2517aa6b69d10d18 (diff) | |
parent | f48b7cc053a991404f973ca59dfede87ff6492db (diff) | |
download | rails-5341b84936d93ec90e6252af437a3871101c115a.tar.gz rails-5341b84936d93ec90e6252af437a3871101c115a.tar.bz2 rails-5341b84936d93ec90e6252af437a3871101c115a.zip |
Merge pull request #7995 from adimichele/master
Small change to active_record/locale/en.yml
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/validations/i18n_generate_message_validation_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/test/cases/validations/i18n_generate_message_validation_test.rb b/activerecord/test/cases/validations/i18n_generate_message_validation_test.rb index 2f5ee32538..174d96aa4e 100644 --- a/activerecord/test/cases/validations/i18n_generate_message_validation_test.rb +++ b/activerecord/test/cases/validations/i18n_generate_message_validation_test.rb @@ -54,4 +54,9 @@ class I18nGenerateMessageValidationTest < ActiveRecord::TestCase end end + test "translation for 'taken' can be overridden" do + I18n.backend.store_translations "en", {errors: {attributes: {title: {taken: "Custom taken message" }}}} + assert_equal "Custom taken message", @topic.errors.generate_message(:title, :taken, :value => 'title') + end + end |