aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model/validations/with.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2009-12-23 00:36:51 +0100
committerJosé Valim <jose.valim@gmail.com>2009-12-23 00:36:51 +0100
commitf1085f41287687835659fa23079080204fe32e96 (patch)
tree8d8899c556c2b4aec9e377f842c15fe0a51416fd /activemodel/lib/active_model/validations/with.rb
parent2476c5312dcbd29f49672f71617a3d34c6a60cc7 (diff)
downloadrails-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.rb5
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