diff options
author | Henrik Nyh <henrik@nyh.se> | 2013-02-09 15:54:14 +0100 |
---|---|---|
committer | Henrik Nyh <henrik@nyh.se> | 2013-02-09 15:54:14 +0100 |
commit | 53c22e097ad416e32a216fdf0fd70d9a1a47cecf (patch) | |
tree | 1d51de09b1acb068bd94dbd9366984fc5aaaf6a7 /activemodel | |
parent | 045f0195e09828fad7770794ade996aa62664647 (diff) | |
download | rails-53c22e097ad416e32a216fdf0fd70d9a1a47cecf.tar.gz rails-53c22e097ad416e32a216fdf0fd70d9a1a47cecf.tar.bz2 rails-53c22e097ad416e32a216fdf0fd70d9a1a47cecf.zip |
Clarify ActiveModel::Validator initialization in docs.
As discussed with @josevalim on Ruby Rogues Parley.
Diffstat (limited to 'activemodel')
-rw-r--r-- | activemodel/lib/active_model/validator.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/activemodel/lib/active_model/validator.rb b/activemodel/lib/active_model/validator.rb index f989b21140..037650e5ac 100644 --- a/activemodel/lib/active_model/validator.rb +++ b/activemodel/lib/active_model/validator.rb @@ -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>. # |