2013-10-12 2 views

Répondre

5

La question est vraiment comment faire une instruction sql WHERE ... IN en utilisant activeecord:

scope :west_coast, where(st: %w(CA WA OR)) 
0

Essayez ceci:

scope :west_coast, where(['st = ? or st = ? or st = ?'], "CA", "WA", "OR") 
Questions connexes