diff options
author | Prem Sichanugrist <s@sikachu.com> | 2010-02-18 22:28:48 +0700 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-02-21 12:37:46 +0100 |
commit | 8f97e9d19abf02b33c5f7c0c1f1d5daf13e28893 (patch) | |
tree | 3858a21a27d5c83e67b28722a3b7b9d62c16efa9 /activemodel/test/cases/validations | |
parent | 250c8092461f5e6bf62751b313f6605a37fd1b2b (diff) | |
download | rails-8f97e9d19abf02b33c5f7c0c1f1d5daf13e28893.tar.gz rails-8f97e9d19abf02b33c5f7c0c1f1d5daf13e28893.tar.bz2 rails-8f97e9d19abf02b33c5f7c0c1f1d5daf13e28893.zip |
Add validators reflection so you can do 'Person.validators' and 'Person.validators_on(:name)'.
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'activemodel/test/cases/validations')
-rw-r--r-- | activemodel/test/cases/validations/with_validation_test.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/activemodel/test/cases/validations/with_validation_test.rb b/activemodel/test/cases/validations/with_validation_test.rb index 66b072ea38..92df4dd6cd 100644 --- a/activemodel/test/cases/validations/with_validation_test.rb +++ b/activemodel/test/cases/validations/with_validation_test.rb @@ -9,6 +9,7 @@ class ValidatesWithTest < ActiveRecord::TestCase def teardown Topic.reset_callbacks(:validate) + Topic._validators.clear end ERROR_MESSAGE = "Validation error from validator" |