From fa14d6d51ed89acde66b49e8d3a6423396c3d553 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Fri, 8 Jan 2010 08:34:44 +0100 Subject: Compile length validator options still at the class level, so whenever the validator is called, it just needs to check for :maximum, :minimum and :is values. --- activemodel/lib/active_model/validations/inclusion.rb | 1 - 1 file changed, 1 deletion(-) (limited to 'activemodel/lib/active_model/validations/inclusion.rb') diff --git a/activemodel/lib/active_model/validations/inclusion.rb b/activemodel/lib/active_model/validations/inclusion.rb index 25b8c7866d..0c1334fe1b 100644 --- a/activemodel/lib/active_model/validations/inclusion.rb +++ b/activemodel/lib/active_model/validations/inclusion.rb @@ -2,7 +2,6 @@ module ActiveModel module Validations class InclusionValidator < EachValidator def check_validity! - options[:in] ||= options.delete(:within) raise ArgumentError, "An object with the method include? is required must be supplied as the " << ":in option of the configuration hash" unless options[:in].respond_to?(:include?) end -- cgit v1.2.3