提交 c1e3a8c3 编写于 作者: A Akshay Vishnoi

Use #include? instead of #any?, make it simpler

上级 2b6e3051
......@@ -104,7 +104,7 @@ def polymorphic_url(record_or_hash_or_array, options = {})
recipient = self
if record_or_hash_or_array.kind_of?(Array)
if record_or_hash_or_array.any?(&:nil?)
if record_or_hash_or_array.include? nil
raise ArgumentError, "Nil location provided. Can't build URI."
end
record_or_hash_or_array = record_or_hash_or_array.dup
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册