Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Change 'validates_presence_of' to 'presence: true'

Of course validates_presence_of is still working but it is not explained in the guide, I think consequently should use 'presence: true' in this documentation.
  • Loading branch information...
commit ffde34d51075e584658b5d492a9d2b101c5633b7 1 parent 1655f41
@szines szines authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  guides/source/active_record_validations.md
View
2  guides/source/active_record_validations.md
@@ -434,7 +434,7 @@ end
Note that the default error messages are plural (e.g., "is too short (minimum
is %{count} characters)"). For this reason, when `:minimum` is 1 you should
-provide a personalized message or use `validates_presence_of` instead. When
+provide a personalized message or use `presence: true` instead. When
`:in` or `:within` have a lower limit of 1, you should either provide a
personalized message or call `presence` prior to `length`.
Please sign in to comment.
Something went wrong with that request. Please try again.