1.~~~ids = Object.where(条件).pluck(:id)
2.Hoge = Object.find(~~~ids)
Hogeにwhereの条件で絞った、オブジェクトが複数得れる
Go to list of users who liked
Share on X(Twitter)
Share on Facebook
More than 3 years have passed since last update.
1.~~~ids = Object.where(条件).pluck(:id)
2.Hoge = Object.find(~~~ids)
Hogeにwhereの条件で絞った、オブジェクトが複数得れる
Register as a new user and use Qiita more conveniently
Go to list of users who liked