Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
次のようなRailsモデルのスコープ引数にORステートメントを追加することは可能ですか?
scope :west_coast, where(:st => "CA" || "WA" || "OR")
これを試して:
scope :west_coast, where(['st = ? or st = ? or st = ?'], "CA", "WA", "OR")