diff options
author | José Valim <jose.valim@gmail.com> | 2009-12-31 14:14:29 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-01-02 22:27:02 +0100 |
commit | 7cc0a4cfa1d18c011d6e41f57d25eb10ed018eba (patch) | |
tree | 36e56a57e7aad463213c038dd8a2848e5cb94c48 /activemodel/test/cases | |
parent | 5fdd0e80a4db778268e80435b471090cb14f7229 (diff) | |
download | rails-7cc0a4cfa1d18c011d6e41f57d25eb10ed018eba.tar.gz rails-7cc0a4cfa1d18c011d6e41f57d25eb10ed018eba.tar.bz2 rails-7cc0a4cfa1d18c011d6e41f57d25eb10ed018eba.zip |
Use activerecord.errors.format as in Rails 2.3.5.
Diffstat (limited to 'activemodel/test/cases')
-rw-r--r-- | activemodel/test/cases/validations/i18n_validation_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activemodel/test/cases/validations/i18n_validation_test.rb b/activemodel/test/cases/validations/i18n_validation_test.rb index 1cec15110e..d061b5642c 100644 --- a/activemodel/test/cases/validations/i18n_validation_test.rb +++ b/activemodel/test/cases/validations/i18n_validation_test.rb @@ -61,6 +61,12 @@ class I18nValidationTest < ActiveModel::TestCase @person.errors.full_messages end + def test_errors_full_messages_uses_format + I18n.backend.store_translations('en', :activemodel => {:errors => {:format => "Field {{attribute}} {{message}}"}}) + @person.errors.add('name', 'empty') + assert_equal ["Field Name empty"], @person.errors.full_messages + end + # ActiveRecord::Validations # validates_confirmation_of w/ mocha def test_validates_confirmation_of_generates_message |