Skip to content

Commit ecbca0c

Browse files
author
Stefanni Brasil
committed
Make Custom Validators example more clear
The Active Record Validations guide use `Person < ApplicationRecord` in all examples. When reading about Custom Validators, one of the examples had a different configuration. By using the same example everywhere, this change helps the user save time and feel more confident using the feature.
1 parent cd08e6b commit ecbca0c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

guides/source/active_record_validations.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1078,8 +1078,7 @@ class MyValidator < ActiveModel::Validator
10781078
end
10791079
end
10801080

1081-
class Person
1082-
include ActiveModel::Validations
1081+
class Person < ApplicationRecord
10831082
validates_with MyValidator
10841083
end
10851084
```

0 commit comments

Comments
 (0)