Just found out that this comparison is actually case-sensitive..Anyone know a case-insensitive way of accomplishing the same comparison?
CardReferral.all.map(&:email) - CardSignup.all.map(&:email)
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I don’t think there is any “direct” way like the minus operator, but if you don’t mind getting all your results in lowercase, you can do this:
Otherwise you’ll have to manually do the comparison using
find_allorreject:I’d suggest that reading a reference of Ruby’s standard types might help you come up with code like this. For example, “Programming Ruby 1.9” has all methods of the
Enumerableobject explained starting on page 487 (find_allis on page 489).