Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit de4f9acad8b7014b29352a747926ee2db6f71643 1 parent 73dafba
@elben elben authored
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"
Please sign in to comment.
Something went wrong with that request. Please try again.