aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model/validations/length.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2009-12-23 12:14:00 +0100
committerJosé Valim <jose.valim@gmail.com>2009-12-23 12:14:00 +0100
commit44cd9e0e7132abe632664377f13f3edd1106685a (patch)
tree71373ffe546443361cb9e33010de8c73a835c073 /activemodel/lib/active_model/validations/length.rb
parent279067639f319f3b4bbcaf90c26f286e96df2c77 (diff)
downloadrails-44cd9e0e7132abe632664377f13f3edd1106685a.tar.gz
rails-44cd9e0e7132abe632664377f13f3edd1106685a.tar.bz2
rails-44cd9e0e7132abe632664377f13f3edd1106685a.zip
ActiveRecord::Validations are now built on top of Validator as well.
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!