Permalink
Browse files

Fixing wrong class name.

  • Loading branch information...
1 parent 29399e0 commit 0b2412978f5adfd245670e61e46f224b25b041e4 @reu reu committed Feb 23, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 railties/guides/source/active_record_validations_callbacks.textile
@@ -436,7 +436,7 @@ class Person < ActiveRecord::Base
validates_with GoodnessValidator, :fields => [:first_name, :last_name]
end
-class GoodnessValidator < ActiveRecord::Validator
+class GoodnessValidator < ActiveModel::Validator
def validate(record)
if options[:fields].any?{|field| record.send(field) == "Evil" }
record.errors[:base] << "This person is evil"

0 comments on commit 0b24129

Please sign in to comment.