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

```
```
def coffee(arr, acceptable)
  r = /#{acceptable.join('|')}/i
  arr.select { |s| s =~ r }
end

acceptable = ["dark", "blend", "handsome"]

coffee ["dark", "decaf", "java", "HANDSOME"], acceptable
  #=> ["dark", "HANDSOME"] 
coffee ["dark", "smooth", "BLEND"], acceptable
  #=> ["dark", "BLEND"] 

```

Note

```
r = /#{acceptable.join('|')}/i
  #=> /dark|blend|handsome/i

```