LoginSignup
0
0

More than 1 year has passed since last update.

「Ruby」where文で同じカラムで複数指定する方法

Last updated at Posted at 2021-11-28

where文で配列を同じカラムで複数指定する方法

変更前

@q = Tweet.where(completed: "0")

変更後

@q = where(completed: ['0', '1'])

このように配列にすれば指定できる。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0