From 4312bba6525f1ad65010c7c244e039e6d8f9b7a5 Mon Sep 17 00:00:00 2001 From: jonesdeini Date: Mon, 2 Nov 2020 14:25:05 -0500 Subject: [PATCH] Remove unused methods Validation with a tokenizer was only supported for versions of Rails less than 5. As noted [here](https://github.com/heartcombo/simple_form/blob/v3.5.1/lib/simple_form/components/maxlength.rb#L31-L32) When Rails 4 support was dropped, the use the `has_tokenizer?` method is no longer used anywhere in the project. These changes remove the unused methods. --- lib/simple_form/components/maxlength.rb | 4 ---- lib/simple_form/components/minlength.rb | 4 ---- 2 files changed, 8 deletions(-) diff --git a/lib/simple_form/components/maxlength.rb b/lib/simple_form/components/maxlength.rb index d79d8662..855466e3 100644 --- a/lib/simple_form/components/maxlength.rb +++ b/lib/simple_form/components/maxlength.rb @@ -24,10 +24,6 @@ module SimpleForm find_validator(:length) end - def has_tokenizer?(length_validator) - length_validator.options[:tokenizer] - end - def maximum_length_value_from(length_validator) if length_validator length_validator.options[:is] || length_validator.options[:maximum] diff --git a/lib/simple_form/components/minlength.rb b/lib/simple_form/components/minlength.rb index 6d41fd53..57d3aea4 100644 --- a/lib/simple_form/components/minlength.rb +++ b/lib/simple_form/components/minlength.rb @@ -24,10 +24,6 @@ module SimpleForm find_validator(:length) end - def has_tokenizer?(length_validator) - length_validator.options[:tokenizer] - end - def minimum_length_value_from(length_validator) if length_validator length_validator.options[:is] || length_validator.options[:minimum]