Permalink
Browse files

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

  • Loading branch information...
1 parent 73dafba commit de4f9acad8b7014b29352a747926ee2db6f71643 @elben elben committed Dec 15, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 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 de4f9ac

Please sign in to comment.