From 53c22e097ad416e32a216fdf0fd70d9a1a47cecf Mon Sep 17 00:00:00 2001 From: Henrik Nyh Date: Sat, 9 Feb 2013 15:54:14 +0100 Subject: Clarify ActiveModel::Validator initialization in docs. As discussed with @josevalim on Ruby Rogues Parley. --- activemodel/lib/active_model/validator.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'activemodel') 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 ActiveModel::EachValidator. # -- cgit v1.2.3