views:

11

answers:

1

Hi I am trying to understand why I get a syntax error for this:

:conditions => ["rank = ? and primaries.relationship = ?", ['CPT','SFC'], "Spouse"]

I need to check "rank" against an Array of options.

Seems like this should be pretty simple, any suggestions?

+1  A: 

Something like this perhaps:

:conditions => ["rank IN (?, ?) AND primaries.relationship = ?", 'CPT','SFC', "Spouse"]
bjg