From 8c0d5e0d1cfcec4ae6618e4ae8286421ff0f92fa Mon Sep 17 00:00:00 2001 From: Yves Senn Date: Mon, 13 Jan 2014 11:25:58 +0100 Subject: doc proc/lambda arg on inclusion validation. Closes #13689. [ci skip] --- activemodel/lib/active_model/validations/inclusion.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'activemodel/lib') diff --git a/activemodel/lib/active_model/validations/inclusion.rb b/activemodel/lib/active_model/validations/inclusion.rb index 24337614c5..b344095807 100644 --- a/activemodel/lib/active_model/validations/inclusion.rb +++ b/activemodel/lib/active_model/validations/inclusion.rb @@ -29,7 +29,8 @@ module ActiveModel # * :in - An enumerable object of available items. This can be # supplied as a proc, lambda or symbol which returns an enumerable. If the # enumerable is a numerical range the test is performed with Range#cover?, - # otherwise with include?. + # otherwise with include?. When using a proc or lambda the instance + # under validation is passed as an argument. # * :within - A synonym(or alias) for :in # * :message - Specifies a custom error message (default is: "is # not included in the list"). -- cgit v1.2.3