lem*_*ger 1 activerecord scope named-scope ruby-on-rails
是否可以在rails模型中的范围参数中添加OR语句
scope :west_coast, where(:st => "CA" || "WA" || "OR")
问题是如何WHERE ... IN使用activerecord 创建一个sql 语句:
scope :west_coast, where(st: %w(CA WA OR))