diff options
author | José Valim <jose.valim@gmail.com> | 2009-12-23 00:36:51 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2009-12-23 00:36:51 +0100 |
commit | f1085f41287687835659fa23079080204fe32e96 (patch) | |
tree | 8d8899c556c2b4aec9e377f842c15fe0a51416fd /activemodel/lib/active_model/validations/with.rb | |
parent | 2476c5312dcbd29f49672f71617a3d34c6a60cc7 (diff) | |
download | rails-f1085f41287687835659fa23079080204fe32e96.tar.gz rails-f1085f41287687835659fa23079080204fe32e96.tar.bz2 rails-f1085f41287687835659fa23079080204fe32e96.zip |
Move validations in ActiveModel to validators, however all validatity checks are still in the class method.
Diffstat (limited to 'activemodel/lib/active_model/validations/with.rb')
-rw-r--r-- | activemodel/lib/active_model/validations/with.rb | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/activemodel/lib/active_model/validations/with.rb b/activemodel/lib/active_model/validations/with.rb index 8313aded11..626e9d5731 100644 --- a/activemodel/lib/active_model/validations/with.rb +++ b/activemodel/lib/active_model/validations/with.rb @@ -50,10 +50,7 @@ module ActiveModel # def validates_with(*args) options = args.extract_options! - - args.each do |klass| - validate klass.new(options.except(:on, :if, :unless)), options - end + args.each { |klass| validate(klass.new(options), options) } end end end |