From 1747c4e2cea811cbf04fccc9f57256c80112d9ce Mon Sep 17 00:00:00 2001 From: Robin Dupret Date: Sun, 15 Feb 2015 12:30:38 +0100 Subject: Tiny documentation edits [ci skip] --- activemodel/lib/active_model/validations/length.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'activemodel/lib') diff --git a/activemodel/lib/active_model/validations/length.rb b/activemodel/lib/active_model/validations/length.rb index c63a9d74b3..23201b264a 100644 --- a/activemodel/lib/active_model/validations/length.rb +++ b/activemodel/lib/active_model/validations/length.rb @@ -112,10 +112,12 @@ module ActiveModel # * :message - The error message to use for a :minimum, # :maximum, or :is violation. An alias of the appropriate # too_long/too_short/wrong_length message. - # * :tokenizer - Specifies a method, proc or string to how to split up the attribute string. - # (e.g. tokenizer: ->(str) { str.scan(/\w+/) } or tokenizer: :word_tokenizer to count words - # as in above example). Defaults to ->(value) { value.split(//) } - # which counts individual characters. + # * :tokenizer - A method (as a symbol), proc or string to + # specify how to split up the attribute string. (e.g. + # tokenizer: :word_tokenizer to call the +word_tokenizer+ method + # or tokenizer: ->(str) { str.scan(/\w+/) } to count words as in + # above example). Defaults to ->(value) { value.split(//) } which + # counts individual characters. # # There is also a list of default options supported by every validator: # +:if+, +:unless+, +:on+ and +:strict+. -- cgit v1.2.3