Permalink
Browse files

It should be ActiveModel::Validator, not ActiveRecord::Validator.

  • Loading branch information...
1 parent becb008 commit 463522afc5d2732388317265dd17258b76dea750 @elben elben committed with fxn Dec 15, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 railties/guides/source/active_record_validations_callbacks.textile
View
2 railties/guides/source/active_record_validations_callbacks.textile
@@ -414,7 +414,7 @@ class Person < ActiveRecord::Base
validates_with GoodnessValidator
end
-class GoodnessValidator < ActiveRecord::Validator
+class GoodnessValidator < ActiveModel::Validator
def validate
if record.first_name == "Evil"
record.errors[:base] << "This person is evil"

0 comments on commit 463522a

Please sign in to comment.