secret
Last active

  • Download Gist
gistfile1.diff
Diff
1 2 3 4 5 6 7 8 9 10 11
+++ a/have_sent_email.rb
--- b/have_sent_email.rb
@@ -98,7 +98,7 @@ module Shoulda # :nodoc:
def regexp_or_string_match_in_array(an_array, a_regexp_or_string)
case a_regexp_or_string
when Regexp
- an_array.detect{|e| e =~ a_regexp_or_string}.any?
+ an_array.select{|e| e =~ a_regexp_or_string}.any?
when String
an_array.include?(a_regexp_or_string)
end

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.