Skip to content

Commit

Permalink
Use #include? instead of #any?, make it simpler
Browse files Browse the repository at this point in the history
  • Loading branch information
Akshay Vishnoi committed May 3, 2014
1 parent 2b6e305 commit c1e3a8c
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -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
Expand Down

0 comments on commit c1e3a8c

Please sign in to comment.