0
Help us understand the problem. What are the problem?

posted at

備忘録 whereでオブジェクトを得れなくて困っている君へ

1.~~~ids = Object.where(条件).pluck(:id)
2.Hoge = Object.find(~~~ids)

Hogeにwhereの条件で絞った、オブジェクトが複数得れる

Register as a new user and use Qiita more conveniently

  1. You can follow users and tags
  2. you can stock useful information
  3. You can make editorial suggestions for articles
What you can do with signing up
0
Help us understand the problem. What are the problem?