aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2012-10-19 17:39:58 -0700
committerRafael Mendonça França <rafaelmfranca@gmail.com>2012-10-19 17:39:58 -0700
commit5341b84936d93ec90e6252af437a3871101c115a (patch)
tree40975e0b1c248cbad27837fc3b3c7b4eca05612a /activerecord/test
parentc50de96200da6a507c96891f2517aa6b69d10d18 (diff)
parentf48b7cc053a991404f973ca59dfede87ff6492db (diff)
downloadrails-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.rb5
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