回答編集履歴

2

修正

2019/05/25 18:52

投稿

mottox2
mottox2

スコア299

test CHANGED
@@ -30,4 +30,4 @@
30
30
 
31
31
 
32
32
 
33
- 前者の方はArrayに変換されているので(mapを使っているため)、ActiveRecord_Relationを保っている後者の方がいいような気がします。(理解できなければどちらでも構いません)
33
+ 前者の方はArrayに変換されているので(mapを使っているため)、ActiveRecord_Relationを保っている後者が質問答えとしてふさわしと思います

1

サンプルコードを修正 id => a_id

2019/05/25 18:52

投稿

mottox2
mottox2

スコア299

test CHANGED
@@ -24,7 +24,7 @@
24
24
 
25
25
  ```ruby
26
26
 
27
- @bs = B.where(id: A.ids)
27
+ @bs = B.where(a_id: A.ids)
28
28
 
29
29
  ```
30
30