Clarify ActiveModel::Validator initialization in docs.

As discussed with @josevalim on Ruby Rogues Parley.
This commit is contained in:
Henrik Nyh 2013-02-09 15:54:14 +01:00
parent 045f0195e0
commit 53c22e097a
1 changed files with 3 additions and 0 deletions

View File

@ -60,6 +60,9 @@ module ActiveModel
# end
# end
#
# Note that the validator is initialized only once for the whole application
# lifecycle, and not on each validation run.
#
# The easiest way to add custom validators for validating individual attributes
# is with the convenient <tt>ActiveModel::EachValidator</tt>.
#