From f1085f41287687835659fa23079080204fe32e96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Wed, 23 Dec 2009 00:36:51 +0100 Subject: Move validations in ActiveModel to validators, however all validatity checks are still in the class method. --- activemodel/lib/active_model.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'activemodel/lib/active_model.rb') diff --git a/activemodel/lib/active_model.rb b/activemodel/lib/active_model.rb index e0de27b96d..6aa80da23f 100644 --- a/activemodel/lib/active_model.rb +++ b/activemodel/lib/active_model.rb @@ -35,9 +35,9 @@ module ActiveModel autoload :Dirty autoload :Errors autoload :Lint - autoload :Name, 'active_model/naming' + autoload :Name, 'active_model/naming' autoload :Naming - autoload :Observer, 'active_model/observing' + autoload :Observer, 'active_model/observing' autoload :Observing autoload :Serialization autoload :StateMachine @@ -45,6 +45,7 @@ module ActiveModel autoload :Validations autoload :ValidationsRepairHelper autoload :Validator + autoload :EachValidator, 'active_model/validator' autoload :VERSION module Serializers -- cgit v1.2.3 From 279067639f319f3b4bbcaf90c26f286e96df2c77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Wed, 23 Dec 2009 01:37:19 +0100 Subject: validates_each uses a BlockValidator. --- activemodel/lib/active_model.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'activemodel/lib/active_model.rb') diff --git a/activemodel/lib/active_model.rb b/activemodel/lib/active_model.rb index 6aa80da23f..abb04cd624 100644 --- a/activemodel/lib/active_model.rb +++ b/activemodel/lib/active_model.rb @@ -46,6 +46,7 @@ module ActiveModel autoload :ValidationsRepairHelper autoload :Validator autoload :EachValidator, 'active_model/validator' + autoload :BlockValidator, 'active_model/validator' autoload :VERSION module Serializers -- cgit v1.2.3 From 74098e4cb6de01745db8f1d8d567645553ade7c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Wed, 23 Dec 2009 13:30:58 +0100 Subject: No need to use ValidationsRepairHelper hack on ActiveModel anymore, Model.reset_callbacks(:validate) is enough. However, tests in ActiveRecord are still coupled, so moved ValidationsRepairHelper back there. --- activemodel/lib/active_model.rb | 1 - 1 file changed, 1 deletion(-) (limited to 'activemodel/lib/active_model.rb') diff --git a/activemodel/lib/active_model.rb b/activemodel/lib/active_model.rb index abb04cd624..ee83e3eddd 100644 --- a/activemodel/lib/active_model.rb +++ b/activemodel/lib/active_model.rb @@ -43,7 +43,6 @@ module ActiveModel autoload :StateMachine autoload :Translation autoload :Validations - autoload :ValidationsRepairHelper autoload :Validator autoload :EachValidator, 'active_model/validator' autoload :BlockValidator, 'active_model/validator' -- cgit v1.2.3