From c3fa5c3d25d9148d2806db577a2261032b341c34 Mon Sep 17 00:00:00 2001 From: kakipo Date: Sun, 3 Aug 2014 14:50:09 +0900 Subject: Allow symbol as values for `tokenize` of `LengthValidator` --- activemodel/test/models/topic.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'activemodel/test/models') diff --git a/activemodel/test/models/topic.rb b/activemodel/test/models/topic.rb index 1411a093e9..fed50bc361 100644 --- a/activemodel/test/models/topic.rb +++ b/activemodel/test/models/topic.rb @@ -37,4 +37,8 @@ class Topic errors.add attr, "is missing" unless send(attr) end + def my_word_tokenizer(str) + str.scan(/\w+/) + end + end -- cgit v1.2.3