Question: A small and simple question, I have these 2 where example clauses:

```
Product.where("name = ? AND is_done = ?", "test",false)

Product.where(name:"test").where(is_done:false)

```

I would rather use the second one because its more readable and easier to add more where if I want, now my question is: Which one is faster, more secure and/or more recommended? 

Thanks for yout answers =)

Answer: 
This'll get the intersection, but id doesn't exactly use the funky `&` operator or sets.

```
def coffee(rest)
  acceptable_coffee = ["dark", "blend", "handsome"]
  rest.select { |name| acceptable_coffee.include? name.downcase }
end

```
This isn't the prettiest way, but you can do this to preserve the upper case.

```
def coffee(arr)
  acceptable_coffee = ["dark", "blend", "handsome"]
  good_coffee = (acceptable_coffee & arr) + (arr & acceptable_coffee.map(&:upcase))
end

coffee(arr1) #=> ["dark", "HANDSOME"]
coffee(arr2) #=> ["dark", "BLEND"]

```