lib/lite/validators/url_validator.rb in lite-validators-1.5.0 vs lib/lite/validators/url_validator.rb in lite-validators-1.6.0
- old
+ new
@@ -42,10 +42,10 @@
hosts = options[:include_host] || options[:exclude_host]
return true unless hosts
value_downcased = value.host.to_s.downcase
check = options[:include_host] ? :any? : :none?
- check = Array(hosts).send(check) { |host| value_downcased.include?(host.to_s.downcase) }
+ check = Array(hosts).public_send(check) { |host| value_downcased.include?(host.to_s.downcase) }
return true if check
record.errors.add(attribute, error_message_for(:host))
end