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.
This commit is contained in:
Zoltan Debre 2013-04-16 00:56:12 +02:00
parent 1655f4142e
commit ffde34d510
1 changed files with 1 additions and 1 deletions

View File

@ -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`.