diff options
author | José Valim <jose.valim@gmail.com> | 2009-10-20 22:20:01 -0200 |
---|---|---|
committer | Carl Lerche <carllerche@mac.com> | 2009-10-20 17:52:32 -0700 |
commit | e714b499cc1f7ebc84f8d0e96607b79e60f2828d (patch) | |
tree | a9725eb2101a56db366603ca849a3ed260b710d6 /activemodel/test/cases/validations/with_validation_test.rb | |
parent | 4f6d6f7031a88b647814fc0154e6b69b636dc912 (diff) | |
download | rails-e714b499cc1f7ebc84f8d0e96607b79e60f2828d.tar.gz rails-e714b499cc1f7ebc84f8d0e96607b79e60f2828d.tar.bz2 rails-e714b499cc1f7ebc84f8d0e96607b79e60f2828d.zip |
Move validator, human_name and human_attribute_name to ActiveModel, remove deprecated error messages and add i18n_scope and lookup_ancestors.
Signed-off-by: Carl Lerche <carllerche@mac.com>
Diffstat (limited to 'activemodel/test/cases/validations/with_validation_test.rb')
-rw-r--r-- | activemodel/test/cases/validations/with_validation_test.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/activemodel/test/cases/validations/with_validation_test.rb b/activemodel/test/cases/validations/with_validation_test.rb index c290b49a28..fae87a6188 100644 --- a/activemodel/test/cases/validations/with_validation_test.rb +++ b/activemodel/test/cases/validations/with_validation_test.rb @@ -13,24 +13,24 @@ class ValidatesWithTest < ActiveRecord::TestCase ERROR_MESSAGE = "Validation error from validator" OTHER_ERROR_MESSAGE = "Validation error from other validator" - class ValidatorThatAddsErrors < ActiveRecord::Validator + class ValidatorThatAddsErrors < ActiveModel::Validator def validate() record.errors[:base] << ERROR_MESSAGE end end - class OtherValidatorThatAddsErrors < ActiveRecord::Validator + class OtherValidatorThatAddsErrors < ActiveModel::Validator def validate() record.errors[:base] << OTHER_ERROR_MESSAGE end end - class ValidatorThatDoesNotAddErrors < ActiveRecord::Validator + class ValidatorThatDoesNotAddErrors < ActiveModel::Validator def validate() end end - class ValidatorThatValidatesOptions < ActiveRecord::Validator + class ValidatorThatValidatesOptions < ActiveModel::Validator def validate() if options[:field] == :first_name record.errors[:base] << ERROR_MESSAGE |