aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model/validations/length.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activemodel/lib/active_model/validations/length.rb')
-rw-r--r--activemodel/lib/active_model/validations/length.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/activemodel/lib/active_model/validations/length.rb b/activemodel/lib/active_model/validations/length.rb
index 04280b401b..6e90a75c17 100644
--- a/activemodel/lib/active_model/validations/length.rb
+++ b/activemodel/lib/active_model/validations/length.rb
@@ -9,9 +9,8 @@ module ActiveModel
attr_reader :type
def initialize(options)
- options[:tokenizer] ||= DEFAULT_TOKENIZER
@type = (OPTIONS & options.keys).first
- super
+ super(options.reverse_merge(:tokenizer => DEFAULT_TOKENIZER))
end
def check_validity!