aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model/validations/inclusion.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2010-01-08 08:34:44 +0100
committerJosé Valim <jose.valim@gmail.com>2010-01-08 21:36:04 +0100
commitfa14d6d51ed89acde66b49e8d3a6423396c3d553 (patch)
treebc7c7804f70c72d51580a44d5214610fe818a15a /activemodel/lib/active_model/validations/inclusion.rb
parent188d52165bc9184a143a468ee951981d159dbea6 (diff)
downloadrails-fa14d6d51ed89acde66b49e8d3a6423396c3d553.tar.gz
rails-fa14d6d51ed89acde66b49e8d3a6423396c3d553.tar.bz2
rails-fa14d6d51ed89acde66b49e8d3a6423396c3d553.zip
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.
Diffstat (limited to 'activemodel/lib/active_model/validations/inclusion.rb')
-rw-r--r--activemodel/lib/active_model/validations/inclusion.rb1
1 files changed, 0 insertions, 1 deletions
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