Skip to content

Commit

Permalink
Change 'validates_presence_of' to 'presence: true'
Browse files Browse the repository at this point in the history
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
zoltan-nz committed Apr 15, 2013
1 parent 1655f41 commit ffde34d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion guides/source/active_record_validations.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.

Expand Down

0 comments on commit ffde34d

Please sign in to comment.