lib/sequel/plugins/validation_helpers.rb in sequel-5.59.0 vs lib/sequel/plugins/validation_helpers.rb in sequel-5.60.0
- old
+ new
@@ -105,10 +105,10 @@
validatable_attributes_for_type(:format, atts, opts){|a,v,m| validation_error_message(m, with) unless v.to_s =~ with}
end
# Check attribute value(s) is included in the given set.
def validates_includes(set, atts, opts=OPTS)
- validatable_attributes_for_type(:includes, atts, opts){|a,v,m| validation_error_message(m, set) unless set.public_send(set.respond_to?(:cover?) ? :cover? : :include?, v)}
+ validatable_attributes_for_type(:includes, atts, opts){|a,v,m| validation_error_message(m, set) unless set.public_send(defined?(set.cover?) ? :cover? : :include?, v)}
end
# Check attribute value(s) string representation is a valid integer.
def validates_integer(atts, opts=OPTS)
validatable_attributes_for_type(:integer, atts, opts) do |a,v,m|