diff options
author | Brian Cardarella <bcardarella@gmail.com> | 2012-04-23 17:16:05 -0400 |
---|---|---|
committer | Brian Cardarella <bcardarella@gmail.com> | 2012-04-23 17:16:05 -0400 |
commit | fcc534ed76a7ef50bf7887378ce6c68d5ace336c (patch) | |
tree | f72015a8f17a81a669dd8530b1cebfa9e919cdda /activemodel/test/cases/validations/i18n_generate_message_validation_test.rb | |
parent | 82c3aca17e78d25f217702e530586673f2a219d7 (diff) | |
download | rails-fcc534ed76a7ef50bf7887378ce6c68d5ace336c.tar.gz rails-fcc534ed76a7ef50bf7887378ce6c68d5ace336c.tar.bz2 rails-fcc534ed76a7ef50bf7887378ce6c68d5ace336c.zip |
confirmation validation error attribute
This will render the error message on :#{attribute}_confirmation instead
of on attribute itself. When rendering confirmation errors inline on the
form with form builders such as SimpleForm and Formtastic it is
confusing to the ender user to see the confirmation error message on the
attribute element. Instead it makes more sense to have this validation
error render on the confirmation field instead.
The i18n message has been updated for the confirmation validator error
message to include the original attribute name.
Diffstat (limited to 'activemodel/test/cases/validations/i18n_generate_message_validation_test.rb')
-rw-r--r-- | activemodel/test/cases/validations/i18n_generate_message_validation_test.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activemodel/test/cases/validations/i18n_generate_message_validation_test.rb b/activemodel/test/cases/validations/i18n_generate_message_validation_test.rb index 0679e67f84..df0fcd243a 100644 --- a/activemodel/test/cases/validations/i18n_generate_message_validation_test.rb +++ b/activemodel/test/cases/validations/i18n_generate_message_validation_test.rb @@ -37,7 +37,7 @@ class I18nGenerateMessageValidationTest < ActiveModel::TestCase # validates_confirmation_of: generate_message(attr_name, :confirmation, :message => custom_message) def test_generate_message_confirmation_with_default_message - assert_equal "doesn't match confirmation", @person.errors.generate_message(:title, :confirmation) + assert_equal "doesn't match Title", @person.errors.generate_message(:title, :confirmation) end def test_generate_message_confirmation_with_custom_message |